This should get you started: http://codex.wordpress.org/WordPress_Feeds
If it’s a recent version of WordPress, adding this to your header or footer should do the trick. You could also substitute the text for a button instead.
<a href="<?php bloginfo('rss2_url'); ?>">Subscribe to RSS</a>
On the same topic how do you set an RSS feed up for each category? I’ve got your command line fine and it works great in the header but I want a separate feed for each category, how do I do this? Thanks
<a href="<?php bloginfo('url'); ?>/?cat=<?php echo get_cat_ID('Uncategorized'); ?>&feed=rss2">Subscribe to Category RSS</a>
Just change Uncategorized to the the name of the category you want the RSS feed for.
ok, thanks got the syntax, now where do I place the code so that it appears in each category. I assume I add this code somewhere in the catgory section but not sure where
Thanks
In your archive.php file you can add this:
<?php if ( is_category() ) { ?>
<?php ob_start(); printf('%s', single_cat_title('',false)); $tmp = ob_get_clean(); ?>
<a href="<?php bloginfo('url'); ?>/?cat=<?php echo get_cat_ID("$tmp"); ?>&feed=rss2">Subscribe to Category RSS</a>
<?php } ?>
That code should be self-aware and modify the category ID automatically for the archive you are viewing. To see it in action, you can add it above this line:
<?php if (have_posts()) : ?>
Feel free to move it around based on your layout once you see it working.
just come back to this question I asked sometime ago, I’ve used the code and placed it where you said in the archives. It partially works in that it is positioned correctly but it gives me a feed for the whole blog and not the category. Can you provide any further advice….see http://www.simplybetterway.com/blog. You will see the RSS image at the top of each category on the main page. Ignore the ones on the left sidebar
Thanks
PS I swear it worked for a while !
I am getting visiting that say that something is wrong with my RSS feed. They are not able to get the feed.