Home › Forums › General Issues › Query not running as expected › Reply To: Query not running as expected
Ok so on review I think it must be something to do with the conditions within the query I’m running as I’ve double-checked the Return Format of the ACF and it’s set to a Custom value of “U” which should match back to my dateToday variable value.
$comingSoonFilms = new WP_Query(array(
'post_type' => 'film',
'posts_per_page' => -1,
'order' => 'ASC',
'meta_query' => array(
array(
'key' => 'film_releasedate',
'value' => $dateToday,
'type' => 'DATE',
'compare' => '>',
),
array(
'key' => 'film_active',
'value' => '1',
),
)
));
As you can see from the live deployment, I’ve printed both the formatted and unformatted data for the release date. Therefore I don’t think this is related to the Advanced Custom Field itself.
Any thoughts please or things I could try to debug the issue with?
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.