Created
March 22, 2013 03:34
-
-
Save spencejs/5218753 to your computer and use it in GitHub Desktop.
Add Custom Post Type To Main Wordpress 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
//Add Custom Post Type To Feed | |
function mysite_feed_request($vars) { | |
if (isset($vars['feed']) && !isset($vars['post_type'])) | |
$vars['post_type'] = array('post', 'projects'); | |
return $vars; | |
} | |
add_filter('request', 'mysite_feed_request'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment