WordPress.org

Ready to get started?Download WordPress

Forums

RSS feed of only one catagory (7 posts)

  1. Graphics
    Member
    Posted 8 years ago #

    I have several categories running in wordpress, but I would like to "rss feed" only one category. Do I need to make a new xml page, or are there better options?

    I'm not to savy as far as xml goes, so please be clear.

    Thank you!

  2. Mark (podz)
    Support Maven
    Posted 8 years ago #

    I don't see how you can ...

    http://www.example.com/category/feed can be altered by a user to http://www.example.com/feed

  3. exploding-boy
    Member
    Posted 8 years ago #

    To exclude multiple categories i.e. 1,2 and 6, you'll have to work backwards and include only the categories that you want to show up in your feed.
    Add the following to the ROOT index.php before the include to wp-blog-header.php:

    if(isset($_GET['feed'])) {
    $cat='1 2 6';
    }
    change 1,2,6 to the categories you would like to exclude from your feed.

  4. Graphics
    Member
    Posted 8 years ago #

    exploding-boy-

    I only want to supply the 1 cat. feed to other sites, does your fix mean i should make an "index2.php" page, so that I can keep the normal feed everywhere else?

  5. exploding-boy
    Member
    Posted 8 years ago #

    Can you not just link to the category feed like so:
    a href="<?php bloginfo('url'); ?>/?feed=rss&cat=N"
    and replace N for the category you want to pull??

  6. Graphics
    Member
    Posted 8 years ago #

    i dont know, I'll try it and let you know.

    thanx-

  7. Beel
    Member
    Posted 8 years ago #

    It wasn't a question of whether or not it would work, but whether or not it would suit you. :-)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags