Hi, this plugin was made to detect search terms used by the WordPress internal search function. It sounds like the Search & Filter Pro plugin does not hook into the WordPress internal search but is using its own routines, making it impossible to be detected by the Highlight Search Terms plugin…
If you can share a link to your advanced search page, I might be able to tell if search terms are detected at all. If it does, I’ll be able to tell you what is needed to make the highlight show but if not, it’ll be impossible to use Highlight Search Terms for highlighting in combination with Search & Filter Pro.
Hi, thanks for the reply! Here’s the advanced search page: http://www.wisconsinappeals.net/advanced-search/
I really appreciate any help you can give me!
It looks like the plugin cannot detect the search terms and is incompatible with Search & Filter Pro. Sorry…
Hmm…this is possibly a stupid question (since I only vaguely understand how the plugin works!) but in the URL of the search results page of a search for the term “termination” I see
?_sf_s=termination
and in the URL of a regular search results page (which works with Highlight Search Terms) I see ?s=termination
Is there not a way I could get the plugin to look for both s and _sf_s? Or maybe is there a way I could change the code for Search & Filter so that it presents the search terms with just s?
If you are not afraid of modifying the highlight plugin, then you could try adding these lines to hlst.php on line 154:
elseif ( isset($_GET['_sf_s']) AND $search = $_GET['_sf_s'] ) )
self::$search_terms = self::split_search_terms( $search );
I tried, but somehow that code crashed the whole site!
Update: it works! There was an extra parenthesis and once I deleted it, the search terms are now highlighted! Thank you soooo much!
Ow, my bad. I did not test that code before pasting it here… Sorry.
Great to hear you spotted the error and made it work! 🙂