Add Relevanssi support for GeneratePress query loop block

Add Relevanssi support for GeneratePress query loop block.

Snippet Type

Execute on Child Sites

Snippet

add_filter( 'generateblocks_query_loop_args', function( $query_args, $attributes ) {
	if (! is_admin() && ! empty( $query_args['s'] ) ) {
		$query_args['relevanssi'] = true;
	}
	return $query_args;
}, 10, 2 );

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.