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.

The last time I asked a question that required an opinion response, I was awarded the dubious tumbleweed badge. I'm fearful of adding to my collection, but here goes :)

I'm considering writing an option into my theme that would force all pages and posts to have a .html extension and all category landing pages to have URLs without the category base name in them.

For this reason, I'd like to get opinions on how feasible it is to switch between my custom URL structure and the WordPress default structure, in the event the site owner wants to revert back after changing to the new structure.

In the new structure a category landing page would be addressed without the category base name in the url like so:

site.com/blue-widgets

This would normally be written:

site.com/category/blue-widgets

And for this to work, I'm also requiring that all posts and pages end in an extension like .html so as to differentiate between categories and posts of the same name.

For example,

site.com/blue-widgets.html

share|improve this question

1 Answer 1

up vote 1 down vote accepted

WordPress › WP No Category Base « WordPress Plugins correctly reverts permalinks because it doesn't alter them in the first place.

share|improve this answer
    
Thanks for the link! It works great so far, with one exception. I was able to create a post with the same name and post slug as an existing category. So I was unable to get to the post as a result. I believe WP usually intercepts this and appends a number to the post slug. This is the point of my question, to uncover any potential issues like this and ways to overcome them. Any ideas? –  Scott B Feb 4 '11 at 21:13
    
Just answered my own question. As long as you enforce that posts use .html or some other extension, the conflict should not occur. I think this is actually doable! –  Scott B Feb 4 '11 at 21:24

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.