One category has a -1 in the permalink. Where do I fix this?

This topic contains 15 replies, has 3 voices, and was last updated by  Tony Bellens 1 year, 7 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #523772

    Tony Bellens
    Full Member
    Post count: 254

    Hi,

    it seems one category has added a -1 at the end of the permalink. Where in the database would I fix this? I don’t recall having anything else with the same name. The category is Fishing under the Activities category on https://getdirections.asia

    Thank you,
    Tony

    #523783

    Guust
    Moderator
    Post count: 29970

    You maybe already have a post or a page or a tag with the same name.
    You will have to delete or rename that first.
    Then you can fix the category slug.

    Thanks

    #523788

    Tony Bellens
    Full Member
    Post count: 254

    Hi Guust,

    as mentioned in the post it has to be somewhere, but no idea where. I don’t remember creating anything else than this category called fishing…So where would I look in the database to fix this?

    Had a look but can’t seem to find it.

    Thanks,
    Tony

    #523790

    Guust
    Moderator
    Post count: 29970

    Just search the whole database, you may find “fishing” in the terms table, but changing it there will not fix it everywhere.
    You need to look for all the occurrences [and back up before!!]

    #528407

    Tony Bellens
    Full Member
    Post count: 254

    Hi,

    I really don’t understand what is happening. Now I have more categories with a -1 in the slug and have absolutely not added anything in the past few weeks to the site as it was all working. Please see the attached screenshot.

    #528409

    Tony Bellens
    Full Member
    Post count: 254

    Okay, I just noticed that in some cases, when I add a keyword with Rank Math to a category, it adds a -1 to the slug. I will contact them to see why this is happening.

    #528419

    Guust
    Moderator
    Post count: 29970

    It always happens for the same reason. The slug is already in use somewhere else.
    Rename things to solve it if possible. For example, rename a “car” category to “cars” or “vehicle” or whatever.

    #528428

    Tony Bellens
    Full Member
    Post count: 254

    Hi Guust, sorry that’s not an option. These categories don’t exist anywhere else. That’s the whole point. Here’s what’s happening:
    1. I open an existing category to add a keyword, example Accommodtion I add the keyword accommodation. I scroll down to save the category, now suddenly the slug has a -1. It just doesn’t make any sense. These categories have been ok for over a year. Now I just start to add some SEO and suddenly 30% of these categories show up with a -1 when I click on save. I stopped after the first 2 categories and subcategories as it is messing up all our custom links.

    #528440

    Guust
    Moderator
    Post count: 29970

    when I add a keyword with Rank Math to a category, it adds a -1 to the slug.

    Are you using the same keyword as the category name?

    These categories don’t exist anywhere else.

    They do not have to be other categories. They can be keywords, page titles, tags, anything else that gets a slug.

    It sounds like the SEO plugin is set to take priority for using slugs, or you are using the same keyword as the category name, and therefore when you save, the SEO slug gets saved first, and then the category slug.

    I’ll get one of the developers to have a look at your question too, in case they think we need to have a closer look or there is some easy fix. But most likely it is just how WordPress works, and unless you use different slugs, you will get a -1 appended.

    #528445

    Tony Bellens
    Full Member
    Post count: 254
    This reply has been marked as private.
    #528453

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    #528456

    Tony Bellens
    Full Member
    Post count: 254
    This reply has been marked as private.
    #528457

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    #528462

    Tony Bellens
    Full Member
    Post count: 254
    This reply has been marked as private.
    #528467

    Kiran
    Moderator
    Post count: 7069

    I have renamed all categories slug with -1.

    FYI: You can edit media/attachment slugs from Media > Media Item > Edit page.

    Kiran

Viewing 15 posts - 1 through 15 (of 16 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket