Viewing 13 replies - 1 through 13 (of 13 total)
  • Does it happen to all your posts? Site URL?
    Delete the trashed posts and manualy fix the post permalink.

    Try in https://www.ljcow.com/wp-admin/options-permalink.php
    Normally it adds the ‘-2’ if you create two pages with the exact same title/url/slug.

    Thread Starter thund5000

    (@thund5000)

    Thanks for the response Media X and Mr VW but my trash is empty and I’m sure there’s no duplicate page or post. Its only happening when the title is pure number like this:
    https://www.ljcow.com/20-2/
    https://www.ljcow.com/21-2/
    https://www.ljcow.com/22-2/

    Can you try it in your end? adding page with the title 20 or any number. It also happening to some of the site I manage. If anyone know how to stop WP from adding -2 if the title is number please share. ??

    Thanks

    Yep, i just tried on one of my test sites and it also creates the – 2 if the page title is a number. Hm… If i add leter(s) after the numebr, everything is fine.
    Btw,my test site is using 20 13 theme and no plugins at all.

    Weird thing that if i write a number for the title of a post, that doesn’t happen. Just for pages ??

    This may be deliberate to try and avoid url clashes if the user switches over to a numeric custom permalink.

    I knew that esmi will save the day ??
    On the other hand,thund5000, choose a nice name for your posts/pages. It’s more user-friendly and good for your SEO ranking.

    Thread Starter thund5000

    (@thund5000)

    Thanks esmi :-). Is there any way to stop this?

    Not that I’m are of. Can I ask why you want to use numeric page titles?

    Thread Starter thund5000

    (@thund5000)

    I see, actually I just accidentally discover it, I’m just curious if there’s a way to stop it. With -2 in url is not a problem since I’m making a private page. Thanks ??

    I have a site where -2 is being added to certain pages. These are not numerical pagenames. But they are the same names I had on the site I used as a template. I didn’t duplicate the pages, but I had the menu’s installed when I made the new site.

    Somewhere in the background it thinks I have duplicate pages, but I don’t.

    Can someone tell me where page names live in the databases?

    thanks

    @turiyamoore

    That’s a symptom of other versions of similarly named (and probably deleted) pages that haven’t been removed from the trash. Empty your WordPress trash bin, then you should be able to change the page slug. If that doesn’t work, you might start your own new topic so that it gets some fresh exposure.

    Thanks ClaytonJames!

    So simple! It worked perfectly.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘WordPress adding -2 at the end of the url’ is closed to new replies.