Highlight Search Terms WordPress Plugin
Highlight Search Terms is a WordPress plugin that can highlight search terms on your blog’s search page. The plugin is based on a tutorial by Thaya Kareeson, but it also includes several additional features not present in the tutorial and better browser compatibility.
Features
- Multiple colors : Each word of the search query is higlighted in a different color, for up to five user-configurable colors. The colors will “wrap around” if there are more than five words in the query, i.e. the sixth keyword will have the same color as the first, and so on.
- Phrase highlighting : The plugin understands more advanced search queries like “wordpress plugin” screenshot and will treat a quoted phrase as a single search term. See the screenshots below for an example.
- Browser compatibility : Tested and works in FF 3.0.8, Opera 9.64, Chrome 2.0.173.1 and IE 8. The settings screen is also usable in all of the above, but it works slightly better in FF/Opera.
- Simple configuration : Just a few boxes and a neat color picker from Eyecon
Screenshots
The admin interface :

The color picker :

To demonstrate how it all looks in action, I searched my test blog for “text classification” php “machine learning” AI spam. Here’s the result :

Download
highlight-search-terms.zip (58 Kb)
Extract the archive and upload it to /wp-content/plugins, preserving directory structure.
Installation
In addition to uploading and activating the plugin, you will also need to tell it where you want the search terms to be highlighted. Go to Settings -> Highlight Search Terms and enter the HTML tag ID of the area that contains the search results. You can find the ID either by examining the HTML source code of your search page or by using a webdesign-oriented Firefox extension like DOM Inspector.
In case you have no idea what the above paragraph means, you could just enter “body” (sans quotes) in the “Content ID” field. This setting will make the plugin highlight the search terms anywhere on the search page, including the sidebar and footer.
Related posts :
[...] Highlight Search Terms WordPress Plugin – Highlight Search Terms is a WordPress plugin that can highlight search terms on your blog’s search page. The plugin is based on a tutorial b… [...]
I wonder what kind of effect this has on the bounce %
That’s it! Works perfect – thank’s a lot for this great Plugin!
Hi, after I changed the source code (from #content to #contents), and then change the Content ID in the Settings to the updated one (i.e. #contents), the highlighting doesn’t work anymore. Could you maybe help me with this?
Maybe you have a caching plugin on and the page you’re testing hasn’t been regenerated with the updated theme yet?
Hi, thanks for your prompt response. I doubt I have a caching plugin (Advanced Category Excluder, Askimet, All in One SEO Pack, Highlight Search Terms, Simple Tags, WP-DBManager only). And I dun get wat u mean by “the page you’re testing hasn’t been regenerated with the updated theme yet”. Any suggestions for me?