[ad_1]
Hi, I have a post carousel in my website and I’m using Spectra as a block builder, the question is: Can I select or at least exclude some categories from the carousel? With the default selectors you can select one category or all. I need to exclude some.
Any clues?
[ad_2]
Reading this: https://wpspectra.com/docs/filters-actions-for-post/
Seems like something like:
function filter_post_query( $query_args, $attributes) {
// Modify $query_args values.
// Ex.
$query_args[‘category__not_in’] = 5;
return $query_args;
}
add_filter( ‘uagb_post_query_args_grid’, ‘filter_post_query’, 10, 2 );
Being ‘5’ the category you want to exclude.
Probably need more information to do it right but I hope this will help you-