WordPress.org

Support

Support » Plugins and Hacks » Exclude All Posts in a Category, even if those posts are in other categories

Exclude All Posts in a Category, even if those posts are in other categories

  • I’m having big challenges excluding categories from my feeds, archives, you name it.

    I tried the solution here, to no avail:
    http://wordpress.org/support/topic/wp-31-breaks-rss-customization-via-exclude_category?replies=2

    I think the problem is that the Posts I am trying to Exclude are in multiple categories, so I’m trying exclude category 28, but it’s also in 4 other categories, which are not being excluded. I think this because when I remove a Post from all other categories, and have it only be in Category 28, then I can successfully exclude it.

    Does anyone have any suggestions on how to exclude posts in this one category, even if the posts are in other categories, too? Thanks!

Viewing 1 replies (of 1 total)
  • Ok, after much bungling, this is the query_posts that worked for me! Finally!

    I am excluding category 28, and including category ‘brands’:

    <?php query_posts( array( 'category__not_in' => array(28), 'category_name' => 'brands', 'posts_per_page' => '12', 'paged' => $paged, 'orderby' => 'title', 'order' => 'ASC' ) );?>

Viewing 1 replies (of 1 total)
  • The topic ‘Exclude All Posts in a Category, even if those posts are in other categories’ is closed to new replies.