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.
- 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 126.96.36.199 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 🙂
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 :
highlight-search-terms.zip (58 Kb)
Extract the archive and upload it to
/wp-content/plugins, preserving directory structure.
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 :