This small update adds three new filters to make Term Highlight more adaptive:

searchwp_th_query — Term Highlight attempts to automagically retrieve the search query to use, but this filter lets you specify what to use

The other issue tackled with this release is how to handle Shortcodes when generating ‘global’ excerpts. Term Highlight is also in part an excerpt generation engine which will generate content from your Custom Fields when your native excerpt doesn’t contain search matches. Trouble arose when these fields contained Shortcodes which were in turn echoed (undesirable) or cut off (arguably worse). Term Highlight now takes that into account.

By default Term Highlight will strip your Shortcodes prior to finding a global excerpt. You can disable that using the following hook:

add_filter( 'searchwp_th_strip_shortcodes', '__return_false' );

If you choose to utilize that hook, Term Highlight will fall back to doing Shortcodes. If you don’t want that to happen either (thus ending up in the same boat as prior to 1.8.3) you can also prevent that from happening using this hook:

add_filter( 'searchwp_th_do_shortcode', '__return_false' );

As always, Extension downloads are available on their respective documentation pages:


Want to make your search awesome right now?

More than 30,000 sites have chosen SearchWP!

You can utilize all of the content that’s gone unrecognized by native WordPress keyword search instantly with SearchWP.

Get SearchWP for just $99

  • Committed Support
    If you need help, support is fast, friendly, and here for you
  • Streamlined Setup
    Installation and setup that’s optimized for speed
  • Great Documentation
    Helpful, clear, and usable documentation is a priority

See what SearchWP customers have to say

  • “SearchWP is hands down, the best Wordpress search plugin I have used. WP’s search, out of the box is rather limited. SearchWP turns the search feature into something intuitive and useful.”

  • “I purchased SearchWP for its ability to search inside more than 100 PDF documents on my website. My site visitors are able to see search results with pages, posts and PDFs weighted in my preferred order. Customer support has been very helpful.”

  • “This plugin was a perfect solution for our client’s needs. The technical support that was provided by the SearchWP team was top-notch and they were extremely responsive to my needs and inquiries. Thank you, Elio and the whole team at SearchWP :)”

[wpforms id="3080"]