Created
September 12, 2012 14:54
-
-
Save unix7/3707171 to your computer and use it in GitHub Desktop.
Add CPT to Feed
This file contains 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
// 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