Available since: 3.0
searchwp_do_blocks
View Parameters »Note: Use of this hook will require a manual reindex
By default SearchWP will parse blocks when a post has been created using the block editor (sometimes referred to as Gutenberg) but if you would like to prevent that from happening you can do so with this hook:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Prevent SearchWP from parsing Gutenberg blocks during indexing. | |
add_filter( 'searchwp_do_blocks', '__return_false' ); |
Parameters
Parameter | Type | Description |
---|---|---|
$parse_blocks |
Boolean |
Whether blocks are parsed before indexing |