Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Tom

    (@edge22)

    Hi there,

    We’ll be adding this feature to GB Pro in the near future.

    For now, you can filter the frontend query parameters using the generateblocks_query_loop_args filter.

    For example, give your “Grid” block inside the Query Loop a class (we’ve used my-class-name as an example below), and add the following:

    add_filter( 'generateblocks_query_loop_args', function( $args, $attributes ) {
        if ( ! empty( $attributes['className'] ) && strpos( $attributes['className'], 'my-class-name' ) !== false ) {
            $args['tax_query']['relation'] = 'AND';
        }
    
        return $args;
    }, 10, 2 );

    Hi there! We haven’t heard back from you for a while now so we’re going to go ahead and set this topic as resolved. Feel free to reply if you need any more help.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Using “AND” operator in Query Loop’ is closed to new replies.