Add custom post types to your sites main RSS feed

Adding this snippet to the functions.php of your wordpress theme will include the specified custom post types within your primary RSS feed.

 

 

function custom_feed_request( $vars ) {
if (isset($vars['feed']) && !isset($vars['post_type']))
$vars['post_type'] = array( 'post', 'site', 'plugin', 'theme', 'person' );
return $vars;
}
add_filter( 'request', 'custom_feed_request' );

Be Sociable, Share!

Leave a comment