Query Builder

Query Builder is similar to core Query Loop block, but it has next enhancements

  1. More query selectors. (by post type, custom taxonomy, manual select)
  2. More Order options (by title, id, custom field value, date, random order, date of post changes)
  3. More pagination options (simple pagination, Infinite Scroll)
  4. Filter panel (by meta field value, by taxonomy + taxonomy selector)
  5. Responsive options (choose number of columns per each resolution
  6. Design options for items (background, spacing, border, shadow)
  7. Better default view
  8. Support for Wishlist archives (you need to enable auto detection in Data query settings)
  9. Support for Full Container link
  10. Custom ads areas
  11. Conversion to carousel

You can also add any kind of blocks inside Query Builder. We also prepared some dynamic fields special for Query Builder

Do you want to know more about Query builder?

Check our video


Query Builder has many patterns. You can easily import them and configure by your needs with custom effects. This is example of grid with hover effect

Hooks and filters in Query Builder

Query builder is a very powerful swiss knife block for any loop maker. It has also few filters and hooks which you can use to extend it or add compatibility with other plugins.

How to show post classes on each grid

By default, grid item shows only type of post and post id. But you can extend to show all categories, tags, etc. Here is snippet

add_filter('gspbgrid_item_class', 'gs_item_class', 10, 3);
function gs_item_class($class, $postid, $block_instance){
    $classnew = get_post_class('', $postid);
    $classnew = implode(' ', $classnew);
    $class = $class. ' '.$classnew;
    return $class;

Also, you can change $args of loop. We have filter and action for this. Example

add_filter( 'gspb_module_args_query', function( $args ) {
    if ( ! is_admin() ) {
        $args['wp_grid_builder'] = 'wpgb-content';
    return $args;

This filter will change $args of WP_Query class before it runs.

You can also use action which will affect wp_query after WP_Query

add_action('gspb_after_module_args_query', function ($wp_query){
    return $wp_query;
Copy this post’s content
Copy code below, and paste it (CTRL+V) in content of page