Created
September 18, 2013 18:16
-
-
Save jaredatch/6613183 to your computer and use it in GitHub Desktop.
Add CPT to primary site 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
<?php | |
/** | |
* Add custom post type (slideshow) to primary RSS feed | |
* | |
* @since 1.0.0 | |
* @param array $vars | |
* @return array | |
*/ | |
function ja_feed_request( $vars ) { | |
if ( isset( $vars['feed'] ) && !isset( $vars['post_type'] ) ) | |
$vars['post_type'] = array( 'post', 'slideshow' ); | |
return $vars; | |
} | |
add_filter( 'request', 'ja_feed_request' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment