• Whenever I try to create a subcategory, wordpress creates the slug as “category-parent” instead of “category”, even when I explicitly tell it to name it “category”. If I edit the category slug, it renames it “category-parent-2”. If I rename it again, it goes back to “category-parent”.

Viewing 8 replies - 1 through 8 (of 8 total)
  • I have the same issue on 95% of the sub-categories I create and it is incredibly irritating. Even more frustrating is one here or there will work as its intended, while the others don’t.

    The only thing I’ve found that consistently works thus far is to (a) change the sub-cat to a two word slug with a hyphen, e.g. “sample-name” or (b) end the sub-cat name with a number, e.g. “sample101”

    It’s not perfect, by any means, but at least you get to pick the names yourself.

    I’m having the same problem, and there are several forum posts that indicate other people have the problem, with no offered solution. Anyone? It was working fine for me and suddenly started doing this in 2.7.1.

    I had the same problem until I found out that there was duplicate entries in the database and that’s why wordpress was creating unique slugs by doing child-parent as the slug.

    Cleanup duplicate entries in database and that should solve the problem.

    Rubayat

    Does anyone know how to “clean up duplicate entries in the database”? The database scares me. I don’t want to mess anything up.

    Same question as darya8..

    I found the solution.

    Check the myphpadmin and clear the wp_terms table. All categories and tags in your blog will be deleted. Then start all over again.

    I wrote this in my blog: https://ridhuan.co.cc/blog/2009/04/editing-and-organizing-wordpress-category-slugs/

    sorry.. DON’T CLEAR THE WP_TERMS TABLE. Just edit those you want to change. Might also require changes in WP_TERMS_TAXONOMY and WP_TERMS_RELATIONSHIP. Check thoroughly and understand the system before doing any editing.

    Nice article eworque. I had the same issue (wanting to rename a category slug) and when I looked in the terms table I saw why. It was because I had already created a tag that was using the slug I wanted to use. Once I renamed the tag slug, I was then able to rename the category slug (without making any changes in phpMyAdmin). Problem solved.

    For the related issue of removing /category/ from your category url’s, I’ve simply been using the WP No Category Base plugin which easily does the trick.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Category slugs’ is closed to new replies.