Reply To: action or filter to change type of search

Home Forums Product Support Forums Ajax Search Pro for WordPress Support action or filter to change type of search Reply To: action or filter to change type of search

#15894

Ernest Marcinko
Keymaster

Hi!

Well, currently there is no front-end selector for enabling/disabling the search in taxonomy terms, but there are ones for choosing to search in title/content – so maybe I can suggest a possible setup and a small code snippet to covert those selectors for title/category.

I have made a test setup, that displays a drop-down filter of the 'Search in title' and 'Search in content' selectors, and the 'Search in content' selector is converted to a term only search via a small code snippet:

1. Use this setup on the front-end options panel: https://i.imgur.com/SQNnbiz.png
2. Add this custom code to the functions.php in your theme/child theme directory (copy from line 3 only!). Before editing, please make sure to have a full site back-up just in case!

This should do the trick, or at least help you get to the right direction.

Best,
Ernest Marcinko

If you like my products, don't forget to rate them on codecanyon :)