Skip Navigation

[Resolved] Custom Search, is it possible?

This support ticket is created 4 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.

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.

Our next available supporter will start replying to tickets in about 0.87 hours from now. Thank you for your understanding.

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/Karachi (GMT+05:00)

This topic contains 2 replies, has 2 voices.

Last updated by donC-3 4 years, 6 months ago.

Assisted by: Waqar.

Author
Posts
#1609097

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.

#1610213

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

#1610973

Thanks. I think I found a solution but we'll see as I move forward if I need to mess with the filter query.