Created
June 19, 2015 09:13
-
-
Save georgioupanayiotis/109e37480c5a1216dcb7 to your computer and use it in GitHub Desktop.
How to Include WordPress Custom Post Types to Your Site RSS 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 | |
function add_to_custom_feed($qv) { | |
if (isset($qv['feed']) && !isset($qv['post_type'])) | |
$qv['post_type'] = array('post', 'books', 'events'); | |
return $qv; | |
} | |
add_filter('request', 'add_to_custom_feed'); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment