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!
🗓️ Just one more day until the next session of ACF Chat Fridays! Make sure to register for the latest updates on what’s coming in ACF 6.1!— Advanced Custom Fields (@wp_acf) March 30, 2023
📆 Friday 31st March 3pm UTC
👉 Register here - https://t.co/3UtvQbDwNm pic.twitter.com/7xtEJakeQN
© 2023 Advanced Custom Fields.