Created
March 8, 2013 05:19
-
-
Save norcross/5114371 to your computer and use it in GitHub Desktop.
include CPT in an 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 mmk_rss_include( $query ) { | |
if (!$query->is_feed) | |
return $query; | |
$query->set( 'post_type' , array( 'post', 'YOUR_POST_TYPE_NAME' ) ); | |
return $query; | |
} | |
add_filter ( 'pre_get_posts', 'mmk_rss_include' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment