• Resolved the_cobra666

    (@the_cobra666)


    Hi all,

    Why does wordpress add -2 to every number I typ for permalink. If I type: 201010 it makes 201010-2. Same for every other number I type.

    Changing the postname in the database makes no difference. It keeps adding the -2 to every page that only exists with a number.

    It even does this when adding it to a category, like: https://test.com/fotos/fuiven/2010, it changes the permalink to https://test.com/fotos/fuiven/2010-2/. Are numbers reserved for the archive? This can’t be normal behavior.

    Is this a bug?

Viewing 1 replies (of 1 total)
  • Moderator James Huff

    (@macmanx)

    It’s not a bug. Strictly numeric slugs are reserved for date archives and page numbers. WordPress adds the -2 to post slugs to avoid any potential conflicts.

    For example, pretend you had a post titled “2010,” and WordPress didn’t automatically add the -2. One day, you decide to switch to using just /%postname/ as your permalink structure. Now, both your post titled “2010” and the year archive for 2010 share the same URL, test.com/2010/

    WordPress now adds -2 to all numeric post slugs to prevent such a problem.

Viewing 1 replies (of 1 total)
  • The topic ‘Problem with permalinks and pages’ is closed to new replies.