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.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.