Title: Highlight matching string
Last modified: August 20, 2016

---

# Highlight matching string

 *  Resolved [sepehr125](https://wordpress.org/support/users/sepehr125/)
 * (@sepehr125)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/highlight-matching-string/)
 * Thanks for a very well-written plugin. I know this may be stretching it, but 
   I’m wondering how one might go about adding some CSS to the part of the result
   that matches the input. Any insights would be appreciated.
 * Thank you.
 * [http://wordpress.org/extend/plugins/search-autocomplete/](http://wordpress.org/extend/plugins/search-autocomplete/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Trew Knowledge](https://wordpress.org/support/users/trewknowledge/)
 * (@trewknowledge)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/highlight-matching-string/#post-3347485)
 * That would be awesome!
 *  [gizmomol](https://wordpress.org/support/users/gizmomol/)
 * (@gizmomol)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/highlight-matching-string/#post-3347546)
 * I modified search-autocomplete.js to include a _renderItem function that highlights
   the matched term. The modified function is on pastbin at [http://pastebin.com/XzLbUrW4](http://pastebin.com/XzLbUrW4)
 * The plugin uses the “min” version of this function so you would need to change
   the searchautocomplete.php program to enqueue your modified version.
 *  Plugin Author [Gabe Shackle](https://wordpress.org/support/users/hereswhatidid/)
 * (@hereswhatidid)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/highlight-matching-string/#post-3347575)
 * Very cool addon. I’ll include this in the next release with a custom class name.
 *  Plugin Author [Gabe Shackle](https://wordpress.org/support/users/hereswhatidid/)
 * (@hereswhatidid)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/highlight-matching-string/#post-3347578)
 * This has been added to the latest release (2.0.4). Matched strings are now surrounded
   with:
 * `<span class="sa-found-text"></span>`
 * So you can style that directly in your theme’s CSS to control how it looks.
 *  Plugin Author [Gabe Shackle](https://wordpress.org/support/users/hereswhatidid/)
 * (@hereswhatidid)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/highlight-matching-string/#post-3347581)
 * Marking this as resolved due to inactivity.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Highlight matching string’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/search-autocomplete_f8fbfd.svg)
 * [SearchAutocomplete](https://wordpress.org/plugins/search-autocomplete/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/search-autocomplete/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/search-autocomplete/)
 * [Active Topics](https://wordpress.org/support/plugin/search-autocomplete/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/search-autocomplete/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/search-autocomplete/reviews/)

 * 5 replies
 * 4 participants
 * Last reply from: [Gabe Shackle](https://wordpress.org/support/users/hereswhatidid/)
 * Last activity: [12 years, 10 months ago](https://wordpress.org/support/topic/highlight-matching-string/#post-3347581)
 * Status: resolved