Note: You are viewing the documentation for Version 3View Version 4 Docs


View the installation guide, browse the Knowledge Base, find out about SearchWP's many hooks, get support

Available since: 3.0


View Parameters »

By default when implementing highlights, SearchWP will use a <mark> to wrap highlights. If you’d prefer a <span> be used, you can tell SearchWP to do that:

// Tell SearchWP to use <span> for highlights instead of <mark>.
add_filter( 'searchwp_th_use_span', '__return_true' );
view raw functions.php hosted with ❤ by GitHub


Parameter Type Description
$use_span Boolean

Whether to use <span> instead of <mark> for highlights

Fix keyword search on your site. No coding required!

Now you can utilize all of the content that's gone unrecognized by native WordPress keyword search instantly with SearchWP

Get SearchWP