So I modified the existing wordpress RSS feed…
/wp-includes/feed-rss2.php
Using if/else it allows your default RSS to display regular posts or event category feeds…
https://mysite.com/events/categories/music/feed/
Find these lines…
<?php do_action('rss2_head'); ?>
<?php while( have_posts()) : the_post(); ?>
and replace with… (remembering the closing endif statement)
<?php do_action('rss2_head'); ?>
<?php if('event' == get_post_type() ): ?>
<?php
$description_format = str_replace ( ">", ">", str_replace ( "<", "<", get_option ( 'dbem_rss_description_format' ) ) );
$category = get_the_terms( get_the_id(), 'event-categories' ); //////find custom taxonomy category name
foreach ( $category as $cat){
$evcat = $cat->term_id;
}
$EM_Events = EM_Events::get( array('scope'=>'nextfortnight', 'owner'=>false, 'category'=> $evcat) ); // this line pulls in JUST the specified category... and the SCOPE nextfortnight is my own custom scope, replace it with yours or a default
foreach ( $EM_Events as $EM_Event ) {
$description = $EM_Event->output( get_option ( 'dbem_rss_description_format' ), "rss");
$description = ent2ncr(convert_chars(strip_tags($description))); //Some RSS filtering
$event_url = $EM_Event->output('#_EVENTURL');
?>
<item>
<title><?php echo $EM_Event->output( get_option('dbem_rss_title_format'), "rss" ); ?></title>
<link><?php echo $event_url; ?></link>
<guid><?php echo $event_url; ?></guid>
<description><?php echo $description; ?></description>
</item>
<?php
}
?>
<?php else : ?>
<?php while( have_posts()) : the_post(); ?>
// the default stuff here....
<?php endif; ?>
PHEW!