Search term highlighting on my site

Keith posted about his efforts to highlight Google search terms. This is interesting! I may be able to create a b2-prefunction that does the same for b2++.
Update! I modified my original highlightsearch() function, adding in most of the code found on which also fixes the problem of highlighting text inside html links! Woo!
Here’s a Google search for you to try. Hit the Holy Shmoly link to see the highlighted text!
Again, if you want to add this to your own blog, just edit post.tpl add add the highlightsearch modifier around $the_content:


You’ll then have access to lots of highlighted search results!

Leave a Reply

%d bloggers like this:

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.