Problem:
I'm looking at how to make this filter, will it be possible?
https://cdn.toolset.com/wp-content/uploads/2018/07/1042087-Web_1920_1.png?x28969
Solution:
There isn't such a built-in feature within Views plugin, it needs custom codes, for example, you can setup some dropdown menu manually as the screenshot you mentioned above, use them to pass URL parameter to your view, then use Views filter hook "wpv_filter_query" to trigger a PHP function
https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_query
In this PHP function, get the URL parameters, change the views query to what you want according to the URL parameter values
https://codex.wordpress.org/Class_Reference/WP_Query
Relevant Documentation:
https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_query
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | - |
- | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | - |
Supporter timezone: Asia/Hong_Kong (GMT+08:00)
This topic contains 2 replies, has 2 voices.
Last updated by 6 years, 4 months ago.
Assisted by: Luo Yang.