It takes the user's query and highlights all the words on the blog.
It uses jQuery when the referer is a Google, Yahoo or Lycos search engine or within WordPress generated search results.
This plugin is a lightweight, low resource demanding and very simple fusion between How to Highlight Search Terms with jQuery - theme hack by Thaya Kareeson and Search Hilite by Ryan Boren.
This low impact plugin uses only two action hooks, init to insert the jQuery library (already included in your WordPress package) and wp_head to add a custom jQuery extension to your page source code.
The jQuery extension that runs after the page has loaded, wraps all found search terms on that page in <span class="hilite term-N"> ... </span> tags, where N is a number starting with 0 for the first term used in the search phrase increasing 1 for each additional term used. A (part of a) search phrase wrapped in quotes is considered as a single term.
There are no configuration options and there is no predefined highlight styling.
This way the user is completely free to define any CSS styling rule in his themes Stylesheet, style.css, and get result that fit the theme best.
Unpack and upload it to the /wp-content/plugins/ directory.
Activate the plugin through the 'Plugins' menu in WordPress.
- Support for BuddyPress and bbPress highlighting within forum searches.