• Resolved magslhalliday

    (@magslhalliday)


    I’d like to set up my RSS feed so that it only includes posts from the ‘editorial’ category. I’ve looked at the plugins and the only one I could see which was close was Feed Control by slipstream. However, that works on a per post exclusion system (where you define which post ID numbers to exclude) instead of a per category inclusion system (where you define the category ID to include).

    Has anyone got a plugin which does this, or notes on how to edit the templates to do this?

Viewing 7 replies - 1 through 7 (of 7 total)
  • It’s supported natively. If you are using pretty permalinks, your feed is:
    https://yourhost.com/yourblogdirectory/category/editorial/feed/

    If that fails you can use:
    https://yourhost.com/yourblogdirectory/wp-rss2.php?cat=6
    if the category is 6. More info is here:
    https://codex.www.ads-software.com/WordPress_Feeds

    Thread Starter magslhalliday

    (@magslhalliday)

    The problem with that is that it doesn’t suppress the other categories i.e. if a user hits the RSS sub icon on the home page, they get the lot.

    I can do it by excluding individual posts, but that seems a very long and arduous way around things!

    I think I understand what you want to do. You want to change the autodiscovery RSS feed address. You need to go into the header.php file for your theme and make a backup copy.

    Since you didn’t provide a link to your blog, I’m flying a little blind here but find the line inside the head tags that specifies the RSS feed. Usually it looks something like this:
    <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />

    Replace the <?php bloginfo('rss2_url'); ?>
    with https://yourhost.com/yourblogdirectory/category/editorial/feed/

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    Alternatively, the category visibility plugin will do what you want:
    https://ryowebsite.com/?p=46

    Thread Starter magslhalliday

    (@magslhalliday)

    Thanks, Otto42, but that won’t help. I want posts in other categories visible when at the site, but not included in the feed. I’ll try lexhair’s solution and report back…

    Thread Starter magslhalliday

    (@magslhalliday)

    Thanks, lexhair! That seems to have solved it!

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    Thanks, Otto42, but that won’t help. I want posts in other categories visible when at the site, but not included in the feed.

    Actually, then it will help, because that plugin lets you specify what categories are visible where… including the feed. You can hide categories from the feed and still allow them on the homepage.

    Really. Try it before dismissing it. Also gives a cleaner URL for your feed.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Controlling RSS Feed via category inclusion?’ is closed to new replies.