WordPress.org

Forums

[resolved] "-2" appended to page permalink (8 posts)

  1. retroj
    Member
    Posted 2 years ago #

    Hello,

    I have a page called "Photos", and I created a page under it called "2004". I expected the permalink to be "/photos/2004/", but WordPress appended "-2" making the permalink "/photos/2004-2/". I think this may be because there used to be another page called "2004", but that page was deleted. How can I get the permalink "/photos/2004/" for my new "2004" page?

    Thank you

  2. plugins24
    Member
    Posted 2 years ago #

    WordPress does this for double permalinks. If there is no duplicate page just go to the editor and change it by hand. Click on the permalink right under the post/page header to edit it.

  3. retroj
    Member
    Posted 2 years ago #

    I have attempted to edit the permalink, but it changes right back to "2004-2". I can change it to something like "2004foo" but not "2004". There is no other existing page on the site called "2004".

  4. Changing the permalink by hand won't work if there is a dupe page. Go to the Page listing and empty the trash.

  5. retroj
    Member
    Posted 2 years ago #

    No trash is listed, and there is no 'empty trash' link showing. The overview of pages is as follows:

    All (27) |
    Published (26) |
    Draft (1)

  6. retroj
    Member
    Posted 2 years ago #

    I have found that this is not specific to just the "2004" page, but all pages whose title is numeric. I even created a test page called "999432" and the permalink url had "-2" appended. This tells me that my first idea, that this had something to do with an old deleted page having had the same title, was a red herring.

  7. Fully numerical pages seem to be disallowed in WP because of the default archive date structure, as in 2012/1/1 which would be the archive page for January 1st, 2012.

    I just tried to make a new page with the title and slug 2004 on my test server and got the -2 suffix. So that's the case: fully numercial pages slugs are disallowed.

  8. retroj
    Member
    Posted 2 years ago #

    This makes sense. Thank you.

Topic Closed

This topic has been closed to new replies.

About this Topic