Support

Account

Forum Replies Created

  • SOLVED: It works by adding some other conditions to the query like that:

    $new_query = array(
    ‘meta_key’=>’custom_date’,
    ‘orderby’=>’meta_value’,
    ‘order’=>’ASC’,
    ‘post_type’ =>’post’,
    ‘meta_query’ => array(
    ‘key’ => ‘custom_date’,
    ‘value’ => date(‘Y-m-d H:i:s’),
    ‘type’ => ‘DATETIME’,
    ‘compare’=> ‘<‘)
    );

Viewing 1 post (of 1 total)