Tag edit help

This topic contains 7 replies, has 2 voices, and was last updated by  Guust 8 years, 5 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #181474

    Joy
    Buyer
    Post count: 1076

    Hello, I have a bunch of my tags that are being appended with numbers. This is mentioned in your FAQ, but I would like further clarification before messing with my database:

    Why do my locations get a “-1” at the end?

    When a new location is added, the URL might get a “-1” appended. For example
    mysite.com/location/greece-1/
    This happens because WP does not allow duplicate slugs, and there already is something else using the slug greece.
    This is most likely to be a tag, but can also be something else.
    The solution is to search the database for the slug greece and change it to greece-1.
    Then search for greece-1 and replace all results (except the one you just changed) with greece.

    Can you provide more details? This is the structure I am trying to achieve:

    Place
    –City 1
    –City 2
    –City 3

    Event
    –City 1
    –City 2
    –City 3 (etc.)

    This is what WPGeo is creating

    Place
    –City 1
    –City 2
    –City 3

    Event
    –City 1-1
    –City 2-1
    –City 3-1

    Please let me know if you need further clarification. Thank you.

    #181479

    Guust
    Moderator
    Post count: 29970

    Just to clarify that the -1 is added by default by WordPress, not Geodirectory.
    Quite a few different things use slugs, tags, categories, locations etc.

    Whatever gets added to your database first will not have the -1 appended, but anything after will.

    You should not create different locations for different CTPs, the same locations are used by both events and places.
    If you are referring to tags for your events and places, there’s no way around that.

    #181480

    Joy
    Buyer
    Post count: 1076

    Hi Guust. I am referring to tags, sorry the “city” part must’ve been confusing. So if I use the same tags under different CPTs there is no way to remove the numbers that are added? Is this something that will be addresses or is this limited by the way that WP functions?

    #181488

    Guust
    Moderator
    Post count: 29970

    Correct, WP needs to know they belong to a different CPT, you cannot have tags across post types.

    #182473

    Joy
    Buyer
    Post count: 1076

    Okay I am back. I have decided to eliminate the duplicate tags and consolidate into the places post type instead of using CPT. I still see a couple of instances in my tags where it appends the number. How do I change this in my database?

    Thank you.

    #182517

    Guust
    Moderator
    Post count: 29970

    You could try deleting them completely in admin, and then recreate.
    Otherwise you will have to go and change them in the database as explained at https://wpgeodirectory.com/docs/faqs/why-do-my-locations-get-a-1-at-the-end/

    #182520

    Joy
    Buyer
    Post count: 1076

    Okay, thank you for answering all of my questions. I wasn’t sure if deleting from admin and re-creating would work. It did. Thank you.

    #182521

    Guust
    Moderator
    Post count: 29970

    You’re welcome 🙂

Viewing 8 posts - 1 through 8 (of 8 total)

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

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount