Very lightweight jQuery script that wraps search terms in an HTML5 mark tag within wp search results or when referrer is a non-secure search engine.
This plugin has no configuration options page and there is no predefined highlight styling. For any highlighting to become visible in browsers that do not support HTML5 like Internet Explorer 8 or older, you have to complete step II of the installation process. Edit your themes stylesheet (style.css) to contain a rule that will give you exactly the styling that fits your theme.
Sure! See tab Other Notes for instructions and some examples to get you started.
Due to a problem with jQuery's
Let's suppose your theme's index.php or single.php has no
<div <?php post_class() ?> ... > but wraps the post/page content in a
<div id="common" class="content"> ... </div>. You can do two things to solve this:
A. Change your theme and stylesheet so the post/page content div has either
<?php post_class() ?>. TIP: Take a look at how it is done in the Default theme included in each WordPress release. But this might involve some real timeconsuming tinkering with your stylesheet and several theme template files.
B. Change the source of wp-content/plugins/highlight-search-terms/hlst.php so that the array starting on line 55 contains your main content ID or class name. In the above example that can be either
'.content', where a prefix '#' is used for ID and '.' for class.
C. Switch to a theme that does abide by the current WordPress conventions :)
Requires: 2.7 or higher
Compatible up to: 4.7.1
Last Updated: 4 months ago
Active Installs: 8,000+
Got something to say? Need help?