Skip to content

Instantly share code, notes, and snippets.

@jessijean
Created October 27, 2013 19:24
Show Gist options
  • Save jessijean/7186787 to your computer and use it in GitHub Desktop.
Save jessijean/7186787 to your computer and use it in GitHub Desktop.
//add specific custom post types to your rss feed
add_filter('request', 'smashing_custom_feed');
$post_type_list = array( 'post', 'products' );
function smashing_custom_feed( $vars ) {
if ( isset( $vars['feed'] ) AND !isset( $vars['post_type'] ) ) {
$vars['post_type'] = $post_type_list;
}
return $vars;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment