I know it isn’t good practice but I’m considering using same name slugs for some pages and categories on a site that I’m working on. It’s a small site and it doesn’t seem to affect anything in particular.
I added one slug and page with the same name and they worked fine, but when creating a second WP forced me to rename the page (being created after the category) with an additional “-2” being added to the slug. Is there a particular order to create the pages and categories in order to avoid this? I’ve created similar structures before without this appearing. Also checked trash for old pages that might be using the original slug.
Leave a Reply
You must be logged in to post a comment.
I used to do the same thing – create a page with the same name as a category to use as a faux index page.
I think I used this No Category Base plugin to remove the /category/ bit from the URL. (I think it was this plugin.)
There is no way you can avoid this. In WordPress you cannot have two pages/categories with the exact same slug.
Make them slightly different as there’s no way to avoid using the same slugs
I know it’s late, but it might help someone someday. Taken from
How to Change the Category Base Prefix in WordPress.