Question

By doing a simple:

add_feed( 'schedule', 'my_schedule_feed' );


I have created a feed at /feed/schedule/… easy.

But when I go to /schedule/ (which is a page) it is now showing the feed!

Looking at the rewrite rules I see this:

[feed/(feed|rdf|rss|rss2|atom|schedule)/?$] => index.php?&feed=$matches[1]
[(feed|rdf|rss|rss2|atom|schedule)/?$] => index.php?&feed=$matches[1]


This seems really odd. Why would WordPress overwrite existing page rules with the feed, instead of just using only the /feed/ base as expected?

Update: I have tried this as suggested by this answer, and flushing the permalinks, but while it shows up in the rewrites, it does not show the feed at /feed/schedule/

function add_feed_rewrites( $wp_rewrite ) {$feednames = array( 'schedule', 'calendar' );
$feeds = implode( '|',$feednames);
$feed_rule = array( 'feed/(' .$feeds . ')/?$' => 'index.php?&feed=$matches[1]'
);
$wp_rewrite->rules = array_merge($wp_rewrite->rules, \$feed_rule );
}