Skip to content

Instantly share code, notes, and snippets.

@rmorse
Last active October 25, 2024 16:27
Show Gist options
  • Save rmorse/53a3f47d758349c1d8529e29b7558247 to your computer and use it in GitHub Desktop.
Save rmorse/53a3f47d758349c1d8529e29b7558247 to your computer and use it in GitHub Desktop.
Search & Filter v3 + Generate blocks query loop
<?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 );
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment