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(
                    'key' => 'film_releasedate',
                    'value' => $dateToday,
                    'type' => 'DATE',
                    'compare' => '>',
                    '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?