Problem querying ended projects

  • In Progress
    Posted in: Fundingpress  
  • Member
    alessiobandini
    February 8, 2017 at 4:29 pm #95387

    Hi,

    I’m trying to get the ended projects. In order to do this I’ve written a new function using “datum” meta_key in the way below:

    $args = array (
    ‘showposts’ => -1,
    ‘post_type’ => ‘project’,
    ‘orderby’ => ‘post_date’,
    ‘post_status’ => ‘publish’,
    ‘project-category’ => $term->slug,
    ‘meta_query’ => array(
    array(
    ‘key’ => ‘datum’,
    ‘value’ => date(get_option(‘date_format’),time()),
    ‘compare’ => ‘<‘,
    ))
    );

    Al the projects have “datum” field sets to “d/m/Y” and the date(get_option(‘date_format’),time()) give “08/02/2017”, but it seems that is not working good.
    Is there some settings I forgot?

    Thanks a lot.

    Sorry, this forum is for verified users only. Please Login or Register to continue

Comments are closed.