Plugin Directory

Highlight Search Terms

Very lightweight jQuery script that wraps search terms in an HTML5 mark tag when referer is a search engine or within wp search results.

To make it work, you will need to take two steps! (I) A normal installation and activation procedure and (II) adding CSS styling rules to get highlighting for browsers that do not support HTML5 like Internet Explorer 8 or older. Without that last step, visitors using older browsers will not see any hilites.

I. Install now or use the slick search and install feature (Plugins > Add New and search for "highlight search terms") in your WP2.7+ admin section or follow these basic steps.

  1. Download archive and unpack.
  2. Upload (and overwrite) the /highlight-search-terms/ folder and its content to the /plugins/ folder.
  3. Activate plugin on the Plug-ins page

II. Add at least one new rule to your themes styleheet (style.css or a custom stylsheet or a custom css plugin) to style highlightable text.

For example use .hilite { background:#D3E18A; } to get a moss green background on search terms found in the content section (not header, sidebar or footer; assuming your Theme uses a div with class "hentry").

Please find more examples under the Other Notes tab.

Requires: 2.3 or higher
Compatible up to: 3.3.2
Last Updated: 2012-4-21
Downloads: 12,232

Average Rating

4 stars
(23 ratings)

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

2 people say it works.
1 person says it's broken.

100,1,1
50,4,2
50,4,2 100,3,3
0,1,0
100,1,1 67,6,4
50,2,1
100,1,1
0,1,0
100,2,2
100,1,1
100,3,3
100,3,3 100,1,1 100,2,2
67,3,2