The goal is to use query parameters to filter results of a relationship field by a custom taxonomy using a select dropdown, which is populated with that custom taxonomy from the posts that have been selected from the relationship field.
I have a relational field that comprising of posts from a Product custom post type. On the page where these results are displayed, I have a dropdown selection that pulls the custom taxonomy, named product-tag, from these Products and that populates the dropdown selections. The user selects the product tag from the dropdown and I want to filter the results by a query parameter, like this: website.com/?product-tag=tagName. I’ve tried a variety of approaches, building off of this tutorial https://www.advancedcustomfields.com/resources/creating-wp-archive-custom-field-filter/. But the difference here is I’m not filtering posts from the main query, but instead from a custom field relationship query – and I can’t seem to get that to work.
Appreciate any direction. Thanks!
Viewing 1 post (of 1 total)
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users