I’m merging blog posts and a custom post type into a single query and displaying them on my feed as well, here’s the code:
function add_query_news_projects( $query ) {
if ( is_home() && $query->is_main_query() || is_feed() )
$query->set( 'post_type', array( 'post', 'portfolio' ) );
return $query;
}
add_filter( 'pre_get_posts', 'add_query_news_projects' );
The issue I’m having is that blog posts have a taxonomy of "category" and the CPT has a taxonomy of "portfolio_category". I’d like to display the CPT category AS a category in my template AND in my RSS feed. Is there are means to rewrite the results of the $query with "porfolio_category" being "category" for those posts?