I have a category that ends with -2, and there’s no way I can change it back to the plain word. I know there are problems with numeric slugs, but this is just a word. I also know that a common answer is to look in the trash, but there’s no trash for categories as far as I’m aware
Leave a Reply
You must be logged in to post a comment.
You probably have a tag with the same slug. You can’t have any taxonomies with duplicate slugs. Either delete that other taxonomy, rename/change its slug, or change/rename this category.
EDIT
Ok, it turns out you can do this, if you don’t mind programming the fix or directly executing the SQL or messing with PHPMyAdmin. What you need to do is add a new row in
wp_term_taxonomy
that uses the term with the slug you want to use as theterm_id
and the new taxonomy (category in this case) as thetaxonomy
. This is necessary because, if the slug already exists, WP creates a new term rather than using the same term with a different term_taxonomy relationship.Maybe there you used such category name before as subcategory or category and then deleted it. When you created second time category with such name- it got -2.
I had a similar problem. Just removed a new category with -2 slug, then created category in subcategory directory where I deleted it. Then just changed parent- made it parent category.