admin管理员组

文章数量:1122832

I am trying to do custom RSS feeds for specific categorys of events in my event calendar on wordpress.

This one does work:

function custom_organizer_feed_rewrite_rule() {
    add_rewrite_rule('^organizer/([^/]+)/feed/?', 'index.php?organizer_feed_name=$matches[1]', 'top');
}
add_action('init', 'custom_organizer_feed_rewrite_rule');

This one does not:

function custom_venue_category_feed_rewrite_rule() {
    add_rewrite_rule('^events/venues/categorys/superior_category/([^/]+)/feed/?', 'index.php?venue_category_feed_name=$matches[1]', 'top');
}
add_action('init', 'custom_venue_category_feed_rewrite_rule');

Is it because it is nested? How can I use this rule - I just want to get the exact category here ([^/]+).

本文标签: Rewrite rule for nested URL does end in 404