WordPress.org

Ready to get started?Download WordPress

Forums

Seperate RSS feeds for Different Categories (15 posts)

  1. Cypher
    Member
    Posted 9 years ago #

    This feature is already built into WP. Go into index.php and find the call to wp_list_cats.
    It probably doesn't have any options right now, so add the following options so that the call now looks like:

    wp_list_cats('sort_column=name&optioncount=1&feed=RSS');

    The first option sorts the categories by name.
    The second option will list the number of posts in each category.
    The third option will give you the RSS feed for that category.
    If you don't want to list the RSS feed but just use it, then you can simply point your browser to <site.com>/archives/category/<category>/feed and you will get the feed. This, of course, assumes you have permalinks enabled.
    Regards

  2. Usayd
    Member
    Posted 9 years ago #

    Thanks alot - the code works great, thanks again!

  3. cbasturea
    Member
    Posted 9 years ago #

    I hope I'm not getting bad advice (I'm a newbie), but here's what I did in order to have the categories' RSS feed displayed:

    I went to /wp-content/themes/default/sidebar.php (I'm using Kubrick as theme in WP 1.5), and after...

    <li><h2><?php _e('Categories'); ?></h2>

    ... I replaced...

    <?php list_cats(0, '', 'name', 'asc', '', 1, 0, 1, 1, 1, 1, 0,'','','','','') ?>

    --- with the code suggested by Cypher, so the line becomes:

    <?php lwp_list_cats('sort_column=name&optioncount=1&feed=RSS'); ?>

    More about wp_list_cats in Codex:
    http://codex.wordpress.org/Template_Tags/wp_list_cats

    Hope this helps :)

  4. Usayd
    Member
    Posted 9 years ago #

    yea i posted that before 1.5 so its a bit easier now with the codex and stuff, thanks

  5. tjp144
    Member
    Posted 8 years ago #

    I am using WordPress 2.01 and I would like to be able to post 1 RSS feed per category and hopefully have one feed for mutliple categories. I am confused on how to do this or if it can even be done. Any help is greatly appreciated.

  6. Jesper
    Member
    Posted 8 years ago #

    Cypher says: This feature is already built into WP. Go into index.php and find the call to wp_list_cats.

    But mine is this: <?php /* Short and sweet */define 'WP_USE_THEMES', true); require('./wp-blog-header.php');?>

    so it dont make sense to me.

    Please "enlighten" me.

  7. Chris_K
    Member
    Posted 8 years ago #

    You want to look in your theme files. ( /wp-content/themes/YourThemeName). Things have changed since Cypher wrote that post in '04 - I'd suggest checking sidebar.php as that's where this call is found in most themes.

  8. moshu
    Member
    Posted 8 years ago #

    Jesper, you are looking at the wrong file :)
    Whenever the index file is mentioned in general - it always refers to the index.php file in your theme directory: wp-content/themes/yourtheme/index.php

    Also, that post from last year was referring to the pre-theme structure of WP, now you'll find the template tag (most likely) in your sidebar.php - again, in the theme directory.

  9. moshu
    Member
    Posted 8 years ago #

    HS types faster :)

  10. scriptavolant
    Member
    Posted 7 years ago #

    i'm quite new using wordpress and not a developer. i follow the tips f you don't want to list the RSS feed but just use it, then you can simply point your browser to <site.com>/archives/category/<category>/feed
    but i discovered thath this path is not possible to reach. i do not have such folders on my server hosting my wp.

  11. singleton
    Member
    Posted 7 years ago #

    I would love to get a feed address for one of my categories but http://blog.apcug.org/archives/category/Discount/feed does not seem to work. Is that not what was meant by <site.com>/archives/category/<category>/feed

  12. waltzzz
    Member
    Posted 7 years ago #

    I am using one that I created using the tips above but I don't have it listed.

    http://www.thousandsketches.com/blog/?feed=rss2&cat=2

    Try just using that format, I doubt if anything else needs to be set up, but I am very new - so the definitive answer is still to come!

  13. moshu
    Member
    Posted 7 years ago #

    singleton, you are not using "nice permalinks", so for you it would be (for the discount category)
    http://blog.apcug.org/?feed=rss2&cat=8

  14. mrjcleaver
    Member
    Posted 7 years ago #

    This is great... now, is there a plugin that would make this accessible to users? Thx.

  15. EOBeav
    Member
    Posted 7 years ago #

    mrjcleaver, you wouldn't need a plugin. Just use that like you would any other feed to show the content.

Topic Closed

This topic has been closed to new replies.

About this Topic