WordPress will create custom feeds on-the-fly for you if you provide additional query arguments:
<a href="http://yoursite.com/feed/?cat=3,7,8,11">Feed 2</a>
<a href="http://yoursite.com/feed/?cat=1,2,3,7,10">Feed 3</a>
Obviously, modify the domain to match the root of your WP site (which, if running in a subdirectory, should also be included: i.e. http://your-real-domain.com/wordpress/feed/
).
Thanks coffee2code. I did some more research after posting this yesterday and came across several different solutions. I will give it a try this weekend.
How about creating an RSS feed from a sidebar widget’s content? I have a widget that creates a new statement in a div in my sidebar; it changes every night at midnight and remains there all day. The content statement comes from a flat text file, not from the WP loop. I’d like to create a separate RSS feed simply for this. (Everything I have seen relies on the content being within the Loop.)
A good example of what I want to to can be seen at meyerweb.com, the Excuse of the Day.
Suggestions?
Adding a feed can be done in a plugin fairly easily.
First, you create a function to output your feed. Like so:
<?php
function my_feed_function() {
header('Content-Type: text/xml; charset='.get_option('blog_charset'), true);
?>
<rss version="2.0">
... blah blah, output your feed content here however you like...
</rss>
<?php
} // end of function
Then, the key part. Give your feed a name and call the add_feed function:
add_feed('myfeed','my_feed_function');
Then by somebody can go to your site’s /feed/myfeed to get your feed (or ?feed=myfeed, if you use default permalinks).
I would like to add an RSS function to the Events plugin I’m using.
http://meandmymac.net/plugins/events/
Otto42, this seems to be what you are describing, but I’m not clear on how to implement you instructions.
Thanks
The solution Coffee2Code provided no longer works. WordPress 2.7 has this url redirect to only a feed for the first category.
Is there a new way to do this?
Agreed! Is there another way to easily create an RSS feed from a category (I’m already excluding this category with another plug-in, but can’t find an easy way to create a separate RSS feed). Any ideas?