Using same slug name for a page and category

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.

Related posts

Leave a Reply

4 comments

  1. 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.)

    […] this plugin will completely remove the mandatory ‘Category Base’ from your category permalinks ( e.g. myblog.com/category/my-category/ to myblog.com/my-category/ ).

  2. I know it’s late, but it might help someone someday. Taken from
    How to Change the Category Base Prefix in WordPress.

    First you would need to go in your WP-Admin Panel and go to Settings » Permalinks.
    There you would see an Optional box which allows you to
    change the category base prefix and the tag base prefix. (Example
    Below)
    enter image description here
    Simply add the
    text that you like, and you are done. This way is guaranteed to work
    because it is a hard-coded option within WordPress.