Last active
August 7, 2025 14:55
-
-
Save rmorse/53a3f47d758349c1d8529e29b7558247 to your computer and use it in GitHub Desktop.
Search & Filter v3 + Generate blocks (v1) query loop
This file contains hidden or 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 | |
// Adds Search & Filter filtering to a Generate blocks query loop. | |
add_filter( 'generateblocks_query_loop_args', function ( $query_args, $attributes ) { | |
// Replace `1234` with your S&F query ID. | |
$query_args['search_filter_query_id'] = 1234; | |
return $query_args; | |
}, 10, 2 ); | |
// Note: Integration with Generateblocks v2 is offically supported, no need to use this code snippet. | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment