Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.