Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I want to make a custom feed page* with the slug of 'feed', but when I try to save, Wordpress changes it to 'feed-2'.

Is there a way I can force Wordpress to let me use a slug of feed—or, if it's better practice, to hook my custom feed template* into the default Wordpress RSS feed generator? If the latter, what code do I need to substitute my own feed template for the default?

* The custom feed template I'm using is based on the useful code here: http://digwp.com/2011/08/custom-feeds/

share|improve this question
    
Just change the slug name. 'feed' is a reserved word (you should respect that). So get over it. LPT1 is a reserved filename in Windows. I got over it. –  EarnestoDev Oct 26 '11 at 8:12
add comment

1 Answer 1

up vote 1 down vote accepted

That's because "feed" is a reserved term (actually wp_unique_post_slug will match your page name against the rewrite rules).

You might be able to change this by removing the WP feed on init:

unset($GLOBALS['wp_rewrite']->feeds[array_search('feed', $GLOBALS['wp_rewrite']->feeds)]);

(maybe flush the rewrite rules after)

share|improve this answer
    
The only thing is I am using regular WP-generated feeds for other sections of the site. This looks like it would prevent those as well. –  supertrue Oct 26 '11 at 3:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.