Home Forums Front-end Issues ACF checkbox query not working Reply To: ACF checkbox query not working

  • Found the cause of this issue by print_r’ing the entire query and inspecting what was actually going on – had done this a number of times, but overlooked the following detail:

    The issue here wasn’t actually due to the checkbox meta_query, but a conflict between the get_query_var term (‘courses’) and a custom taxonomy whose slug is also ‘courses’.

    When the query was executed, the query seemed to be querying for posts associated with both the custom taxonomy and the selected checkbox value, yielding no results.

    Renaming the name attr to something other than courses then reconfiguring the registered query var and meta_query fixed this issue.