Skip to content

Instantly share code, notes, and snippets.

@unix7
Created September 12, 2012 14:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save unix7/3707171 to your computer and use it in GitHub Desktop.
Save unix7/3707171 to your computer and use it in GitHub Desktop.
Add CPT to Feed
// Source: http://yoast.com/custom-post-type-snippets/
// Add a Custom Post Type to a feed
function add_cpt_to_feed( $qv ) {
if ( isset($qv['feed']) && !isset($qv['post_type']) )
$qv['post_type'] = array('post', '<CPT>');
return $qv;
}
add_filter( 'request', 'add_cpt_to_feed' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment