WordPress.org

Forums

RSS to exclude 1 category from feed (2 posts)

  1. duvys
    Member
    Posted 7 years ago #

    I would like to set my RSS to ignore one of the categories. I tried changing in wp-rss2.php

    $items_count = 0; if ($posts) { foreach ($posts as $post) { start_wp(); ?>

    to

    $items_count = 0; if ($posts) { if (!in_category('1')) { foreach ($posts as $post) { start_wp(); ?>

    But it is still sending even the posts of category 1 to the RSS Feed. How can I set it to exclude a category?

  2. nathanielsandell
    Member
    Posted 7 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic