WordPress.org

Ready to get started?Download WordPress

Forums

RSS Feed for Categories (3 posts)

  1. candv
    Member
    Posted 8 years ago #

    Is there a way to generate RSS feeds for individual categories? Thanks.

  2. Søren Hugger Møller
    Member
    Posted 8 years ago #

    It done automatically.
    The feeds can be found at domain.tld/category/categoryname/feed

    That is if your WP blog is located at the root of your server. If not you might have to add /blog/ or something after domain.tld :)

    And of course it requires the nice URL feature to be enabled... Don't know how to find the category feeds if it's not.

  3. Samuel Wood (Otto)
    Tech Ninja
    Posted 8 years ago #

    Two ways:

    1. If you have pretty permalinks, look at a category page on your blog by clicking on a category link, or whatever you have to do to show the normal page for just one category. Then append "feed/" to that URL.

    2. If you're not using pretty permalinks, use the homepage of your blog (like ht tp://yourblog.com/blog ) and append "?feed=rss2&cat=X" where X is the category id number.

    If you want to do this programmatically (in PHP), use the get_category_rss_link() function. It'll be something like this:
    get_category_rss_link(true, $catID, '');

    The true makes it actually show the link (use false to not show it and just return it to you). The catID is the number of the category. The last bit there is not currently used and so it doesn't much matter what it is. This function works regardless of your permalink settings.

Topic Closed

This topic has been closed to new replies.

About this Topic