WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Category slug problem

[Resolved] Category slug problem

  • jennifer2010
    Member

    @jennifer2010

    When I try to create a new category it forces the category slug to include a -2 after.

    So for example if I put “Shirts” as the name and “shirts” as the slug, after submitting the slug will be turned into “shirts-2” and the correlating permalink which messes up my urls.

    If I delete it and go to mydomain.com/shirts/ it’s a 404, so it’s not like I already have a page…

    Any ideas?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Josh
    Participant

    @josh401

    You probably already created a category with the slugname “shirts” at some point in the past. When you add a slug, it goes directly into the database. So, if you use the same name again, wordpress defaults to making sure it doesn’t have the same name by adding “-2” after it.

    The best way, if you HAVE to use this, would be to go into the database and remove the slugname from there.

    jennifer2010
    Member

    @jennifer2010

    Yep, that worked!

    yourdomain.com/cpanel > phpmyadmin > select your wp database > search > enter slug > select all > open the one’s with matches and find the one where it has your old slug and delete (can’t remember what table it was in) > add category again – fixed. – that’s how I did it.

    Thanks for the help Josh!

    Josh
    Participant

    @josh401

    My pleasure. Glad you got it resolved!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] Category slug problem’ is closed to new replies.