Tell us what you are trying to do?
I have a type called wine. This type has the taxonomy style. I want to filter by style. I'm created a view, but I can only sort and paginate. I want to be able to filter by wine style. Is this possible?
Is there any documentation that you are following?
This pages describes adding a filter to a view. https://toolset.com/documentation/user-guides/views/passing-arguments-to-views/. I can't find these features.
Is there a similar example that we can see?
hidden link
What is the link to your site?
my site is winosity.com.
I'm using blocks 1.3.5 and types 3.4.5.
Hello and thank you for contacting the Toolset support.
I am not really sure to understand what do you mean. Would you want to have a dropdown or radio buttons to filter with the styles? Or would you like the view to display wines only from selected styles? Can you elaborate more on it so I can understand it better?
In the meantime, I checked the view of the hidden link page, and it seems to be built using the Blocks Editor(Gutenberg), you can find the same filters for the features below, from the documentation article, in the content selection section of the view. Check this screenshot hidden link
- Filters by custom fields
- Filters by taxonomies
- Filter by authors
- Filter by post relationships
The example about Controlling the filter with URL arguments is also possible through the same filters. The wpv-search-term shortcode will also work as expected. https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-search-term
But, Controlling the filter with shortcode attributes is not yet available for block-based views. It is only available for views that are created in the legacy editor using shortcodes:
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/
You can enable the legacy editor in Toolset->Settings->General(tab)->Editing Experience.
You can also filter the view using custom code, if you are comfortable with PHP programming, by hooking into the wpv_filter_query and modifying the underlying WP_Query instance:
- https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_query
- https://developer.wordpress.org/reference/classes/wp_query/
My issue is resolved now. Thank you!