Created
October 27, 2013 19:24
-
-
Save jessijean/7186787 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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