Category slug problem

Discussion in 'WordPress' started by bob25, Jul 1, 2010.

  1. #1
    I'm using the custom permalink feature %postname%

    But one category keeps adding a number to the end of the slug (bluewidgets-2)

    I don't have any posts or other categories with the same slug, but for some reason it's not letting me change the slug. I know that with posts sometimes you need to completely delete duplicates from the trash before it stops adding the number to the end. But I don't see that option for the category. :confused:

    Anyone suggestions?

    Thanks
     
    bob25, Jul 1, 2010 IP
  2. pkainulainen

    pkainulainen Greenhorn

    Messages:
    42
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #2
    Hi,

    I ran into a similar problem today and found following blog entry:

    http://www.ridhuan.com/blog/2009/04/editing-and-organizing-wordpress-category-slugs/

    After I investigated my Wordpress database I noticed that the tags and categories are both stored in to the same table called wp_terms (if you are using the wp_ prefix to identifiy your wordpress database tables). Here is an example of my problem:

    I had following tags and categories:

    • Clean Code
    • Unit Testing

    Since I had created the tags before the categories, their slugs were: 'clean-code' and 'unit-testing'. Slugs for categories were: 'clean-code-programming' and 'unit-testing-programming' (The name of their parent category was programming). I solved this problem by adding and appendix -tag to the url slugs of tags. After that I was able to modify the category slugs and rename them to 'clean-code' and 'unit-testing'.

    I hope this was helpful.
     
    pkainulainen, Jul 3, 2010 IP
  3. swiftdeal

    swiftdeal Guest

    Messages:
    48
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Very helpful thank you!! Solved my problem.
     
    swiftdeal, Sep 17, 2010 IP
  4. just-4-teens

    just-4-teens Peon

    Messages:
    3,967
    Likes Received:
    168
    Best Answers:
    0
    Trophy Points:
    0
    #4
    if wordpress is adding a number to your slugs it usually means that the slug is already in use, if its not in use by another category then chances are it is in use by a page or tag
     
    just-4-teens, Sep 19, 2010 IP