Created
July 30, 2015 19:16
-
-
Save anonymous/ec781d6357c83202d4b9 to your computer and use it in GitHub Desktop.
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_filter('pre_get_posts', 'add_cpt_to_main_feed'); | |
function add_cpt_to_main_feed($query){ | |
if ( $query->is_feed() ){ | |
$query->set( 'post_type', array('post', 'xxxxxxx') ); | |
} | |
return $query; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment