<?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;
If you want to make it easier for your users that are using the serach-function, you can highlight the word they searched on. All changes goes in
Edit the class
.search-excerpt as you want your highlight to look!