Support

Account

Home Forums Front-end Issues Custom Post List filtered by ACF criteria Reply To: Custom Post List filtered by ACF criteria

  • Hi magicstick

    Thanks for your quick reply.

    I gave your idea a go but I am not sure how to incorporate the meta_key “start_date” into the equation – could you elaborate. Perhaps I don’t need it as I am not using an ACF start date but the original “published” date.

    I have tried to use the following but with no success (I simplified the fields I am using):

    $args = array(
       'paged' => $paged,
       'post_type' => 'feature',
       'orderby' => 'meta_value_num',
       'meta_query' => array(
       'relation' => 'AND',
       array( 'orderby' => array( 'published' => 'DESC' , 'hide_from_archive' !=   '1' ))
       )
    );			
    $wp_query = new WP_query();
    $wp_query->query($args);

    Thanks again for your advice.