Skip to content

Instantly share code, notes, and snippets.

@wpgaurav
Created April 25, 2020 11:40
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 wpgaurav/4fe2e710cb2bd3c0f8806bfbf7a16ddd to your computer and use it in GitHub Desktop.
Save wpgaurav/4fe2e710cb2bd3c0f8806bfbf7a16ddd to your computer and use it in GitHub Desktop.
Add your custom post types to your sites main RSS feed by default.
<?php // ADD CUSTOM POST TYPES TO THE DEFAULT RSS FEED
function custom_feed_request( $vars ) {
if (isset($vars['feed']) && !isset($vars['post_type']))
$vars['post_type'] = array( 'post', 'site', 'plugin', 'theme', 'person' );
return $vars;
}
add_filter( 'request', 'custom_feed_request' );
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment