Omschrijving
/**
* Deal with the custom RSS templates.
*/
function my_custom_rss() {
if ( ‘event’ === get_query_var( ‘post_type’ ) ) {
get_template_part( ‘page-templates/feed’, ‘events’ );
} else {
get_template_part( ‘page-templates/feed’, ‘rss2’ );
}
}
remove_all_actions( ‘do_feed_rss2’ );
add_action( ‘do_feed_rss2’, ‘my_custom_rss’, 10, 1 );