Created
April 25, 2020 11:40
-
-
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.
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 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