This Documentation is for SearchWP Version 3

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