Hello @luuuciano ,
Unfortunately, as of now, there is no such option to set offset in the Post Carousel block.
However, this can be achieved using the filter code.
To apply different filters for different Post Carousel Blocks you need to add unique classes to each of the blocks from the Advanced Tab of Post Carousel Block.
Please refer to this screenshot.
After that, you can just add the “if” condition for each of the Blocks.
For example: If you want to add different Offsets to different blocks you can use the following code for the Post Carousel block:
function filter_post_query( $query_args, $attributes) {
// Unique class name added from Advanced tab for Post Carousel Block.
if ( 'my-post-grid-class' == $attributes['className'] ) {
$query_args['offset'] = 3;
}
// Unique class name added from Advanced tab for Post Carousel Block.
if ( 'second-my-post-grid-class' == $attributes['className'] ) {
$query_args['offset'] = 4;
}
//And So on....
return $query_args;
}
add_filter( 'uagb_post_query_args_grid', 'filter_post_query', 10, 2 );
I hope this helps.
Regards,
Sweta