Filtering Query Loop Block with ACF User Field
-
I’m trying to filter a Query Loop Block with an ACF User field group.
- A custom post type of “company” is added.
- In the user profile, with an ACF user custom field group, users can select which of the “company” CPTs they want to see on a “View Company Info” page.
- On the “View Company Info” page, a query loop block needs to be filtered by the current user’s “Company” CPT list and display only the companies the user selected on their profile.
I’ve found multiple pages about ACF user custom fields, query loop block variations (filters), and related development. For my purposes, it’s a fragmented collection of how-to, none of which is what I need completely.
- Does anybody know how to do this?
- Or what keywords to look up to get there?
- Is there any documentation that exists for this?
- Any plugin specifically filtering by a user ACF, not by an ACF of the post type being displayed?
I imagine it’s custom code to get the user’s selection of companies and return an array of IDs, and then use that array as a filter for the query loop block.
I hope that describes the issue well enough.
Thanks.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Filtering Query Loop Block with ACF User Field’ is closed to new replies.