Support

Account

Forum Replies Created

  • Passing in a user ID would lead to the same inconsistencies as using a post ID in my use case. I can’t assume that each author would have used each of the values of the ACF checkbox to populate the filter dropdown.

    Additionally, this would fail in the context where a user is not logged in, or is a user without an actual author account – hence why I am hoping to access the ‘Options’ page or DB reference for the field.

  • 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.

Viewing 2 posts - 1 through 2 (of 2 total)