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' ); |
Questions, comments, or suggestion for improvement? Leave a comment on the GitHub Gist page.