display-posts-shortcode icon indicating copy to clipboard operation
display-posts-shortcode copied to clipboard

Include "category__not_in"

Open tibelchior opened this issue 3 years ago • 0 comments

I have the need to avoid some specific categories and WP Query has this option to pass an array of categories IDs to be removed from the current request.

As it was not yet available, I changed the plugin myself and added it - so it's working like intended - but it would be nice to offer this by default on the plugin.

These are my changes, just add:

@ line 61: 'category__not_in' => '', @ line 127: $category__not_in = sanitize_text_field( $atts['category__not_in'] ); @ line 200: if ( ! empty( $category__not_in ) ) $args['category__not_in'] = explode(',',$category__not_in);

tibelchior avatar Sep 15 '22 21:09 tibelchior