• Resolved Zargarov

    (@zargarov)


    Really need the option to exclude entries by category in query. Or some kind of tool for manual processing of wp_query before the templates.

    For example, there are posts with the category News and StickyNews in the category GlobalNews. All posts relate to News and only 3 to StickyNews.

    Make two shortcodes for output

    1. all from Global News excluding News (and possible other categories) – Get StickyNews area

    2. all from Global News excluding StickyNews (and possible other categories) – Get area for dynamic News.

    Get our static StickyNews and dynamic News that do not repeat them.

Viewing 1 replies (of 1 total)
  • Plugin Author Vova

    (@gn_themes)

    Hi @zargarov,

    sorry for the late reply.

    You can modify WP_Query args used in the shortcode by utilizing the su/shortcode/posts/wp_query_args filter in the functions.php file of your theme, like so:

    add_filter( 'su/shortcode/posts/wp_query_args', function( $args, $atts ) {
    
    	// $args['tax_query'] ...
    
    	return $args;
    
    } );
Viewing 1 replies (of 1 total)

The topic ‘su_posts, exlude posts by category from posts with multiple categories’ is closed to new replies.