Reply To: Search results tweak


Ernest Marcinko

No problem at all.

This makes it a bit more difficult, as the tags search is a bit simplified, because it can make the search really really slow if someone has got a bigger database. So in this case changing the keyword logic won't help you, simply because it's not implemented to the tags search.

I made however a quick modification to the search code, but I cannot guarantee a proper speed, but in your case it might just work fine.

Do the following:
0. Make a backup copy of the wp-content/plugins/ajax-search-pro/ directory, just in case.
1. Open up the wp-content/plugins/ajax-search-pro/includes/search_content.class.php file and replace it's contents with this:
2. turn OFF the “Show exact matches only?” option on the General Options->Sources panel (at the bottom), this is very important
3. Change the keyword logic to “AND” or “AND with exact word matches” (if you want more strict results) on the General Options->Behavior tab

Now the keyword logic will respect the terms search (in your case woocommerce tags) as well.

Ernest Marcinko

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