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

Documentation

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

Available since: 3.0

searchwp_th_do_shortcode

View Parameters »

When highlighting is enabled AND searchwp_th_strip_shortcodes returns false, SearchWP will automatically expand Shortcodes prior to seeking content to highlight. You can prevent that behavior with this hook:

<?php
// Prevent SearchWP from expanding Shortcodes when highlighting.
add_filter( 'searchwp_th_do_shortcode', '__return_false' );
view raw functions.php hosted with ❤ by GitHub

Parameters

Parameter Type Description
$enabled Boolean

Whether to expand Shortcodes prior to highlighting

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