Adding the following snippet will let you highlight search results in WordPress.
1 2 3 4 5 6 | <?php // Replace the_exerpt() with: $excerpt = get_the_excerpt(); $keys = explode(" ",$s); $excerpt = preg_replace('/('.implode('|', $keys) .')/iu', '<strong class="search-excerpt">\0</strong>', $excerpt); echo $excerpt; |
Snippet Source/Credit: WPRecipes.com