Highlight Searched Term In WordPress Search Results
A popular way of displaying search results is to highlight the search term in the results. Read on for the code.
Search Result Code
- Navigate to your template directory and open the search.php file
- find the following code
the_title()
- Replace it with the following code
echo $title;
- The line before the previous code insert the following
<?php
$title = get_the_title();
$keys= explode(" ",$s);
$title = preg_replace('/('.implode('|', $keys) .')/iu',
'\0',
$title);
?>
- Open your themes stylesheet and add the following code
strong.search-excerpt { background: yellow; } 

Sample Config for WordPress Running on Varnish 2.1
Are you using 32 bit or 64 bit Office 2010?
Have Outlook 2010 Automatically Close a Message After Replying or Forwarding
How to Start Outlook 2010 in a Different Folder
Do you get Error Code 80071392 Using Windows Live Messenger?
How To Image, Sysprep and Deploy Windows 7 a Complete Guide – Using sysprep and Imagex
How to Disable Auto Renewal for Xbox Live
Installing Windows 7 From a USB Stick From Windows XP (Bootable USB) 