How I create a combo feed using WordPress

When my site was on Barley I had something we called a "combo feed". A combo feed combined all content types (what we called custom post types) into my main RSS feed. This allowed someone to subscribe to a single feed and get all of the blog posts, statuses, photos, and audio bits that I publish. Optionally, they could choose to subscribe to each of them individually, effectively allowing them to opt-out of the ones they’d rather not see. A good example of why someone may do this would be if they followed me on Twitter they may not want to subscribe to my status updates.

I wanted to have this functionality on WordPress too and I thought I’d share how I did it for anyone else that may find it useful. If you see anything I’m doing wrong please let me know.

When I register my custom post types I enable the post type archive. This turns on the /feed URL for each of them. See my statuses feed as an example. According to the Codex page for [register_post_type](http://codex.wordpress.org/Function_Reference/register_post_type) I could also turn on rewrite for ‘feed’. But since I turn on the archive this is done automatically. Here is a slightly modified version of the code I use:

add_action( ‘init’,’custom_post_type_register’ );
function custom_post_type_register() {

Last Updated:

Powered by Hubbub Pro