I have an idea where users would search and in their search box they could put tags they want such as:
tag:Large,Small tag:Villlage,Town
Where this would search for all items tagged as (large or small) AND that must be tagged as (village OR town). So it has to meet both. I do this now with tags and other taxonomies.
I'm just wondering if there is any way to do a custom search that we completely write up separate and have a view use it? if not using toolset think it's possible if we connect into the wordpress hooks somehow?
Just brainstorming.
Hi,
Thank you for contacting us and I'd be happy to assist.
If your goal is to create a custom search form and connect it with a View's results, this is possible.
You'll note that when a search is performed using the View's built-in search form, certain query string parameters are appended to the URL.
( when the view is not set to update results through AJAX )
You can pass on the same query string parameters through your custom search form and the view's filters should work to update the results accordingly.
Additionally, you can also further customize the view's query using a filter like "wpv_filter_query":
https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_query
I hope this helps and please let me know if you need any further assistance around this.
regards,
Waqar
Thanks. I think I found a solution but we'll see as I move forward if I need to mess with the filter query.