I'm trying to create a search where someone can enter a "key word" and be able to search 2 or more custom fields.
Documentation?
I haven't seen any and I've searched.
Similar example?
Yes.
If you go here: hidden link (our current site)
and put "detox" in the "Search by Key word" search box and search, you'll see that it currently returns results found in both the "Specialty" field and the "Key Training" fields.
That search is not using ToolSet, it's using custom but out dated code.
We want to switch the site over to using Toolset.
What is the link to your site?
At this URL: hidden link
There is a parallel version of the site (in the wp6 folder) that I have started to convert over to ToolSet)
I have a Search and a View setup, but obviously its not working yet for "Keyword".
Hello. Thank you for contacting the Toolset support.
Well - I see you are using Text search and it uses the URL param 'wpv_post_search' which holds the keyword. To apply the same keyword to multiple filters you need to use the view's API hook 'wpv_filter_query':
What you should try to do is:
- Add query filter for each of your custom fields from 'Query Filter' section
- Add the 'wpv_filter_query' hook and try to catch the URL param $_GET['wpv_post_search'] and assign the value of this to your other query filters you added
If you do not know how to do it, please share all required information to which custom fields you want to apply the same search key word and access details.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).
I have set the next reply to private which means only you and I have access to it.