Viewing 7 replies - 1 through 7 (of 7 total)
  • this happens when you create a page with the same title and then delete it and re-create it
    the original is still in the trash
    if you empty the trash you can then create the page without the incremental number
    http://codex.wordpress.org/Trash_status

    Thread Starter alfie

    (@drtanz)

    its not this case though, tried it on several sites and different numbers, they are not in the trash but it still happens

    Moderator James Huff

    (@macmanx)

    WordPress does this to protect archive year permalinks. In your case, posts from the year 2000 would be archived under mysite.com/services/2000, which is why you can’t use 2000 as a post slug. Of course, you probably don’t have posts from the year 2000, but it adds a -2 to the end of all numeric post slugs just in case.

    The only work-around would be to spell out the number, like two-thousand.

    Thread Starter alfie

    (@drtanz)

    ah ok thanks!

    Moderator James Huff

    (@macmanx)

    You’re welcome!

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    All numeric slugs is a general problem for WP, as it expects all numerics to be page numbers and similar.

    Solution is basically “don’t use all numeric slugs”, although if you’re willing to forget about paging, there’s plugins to change this as well.

    Thread Starter alfie

    (@drtanz)

    can you suggest some plugins for this?

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘WordPress adds '-2' to slugs’ is closed to new replies.