WordPress.org

Ready to get started?Download WordPress

Forums

WordPress adds a number after my post name in Permalink (7 posts)

  1. Noumaan Yaqoob
    Member
    Posted 4 years ago #

    When I save a post wordpress adds a number at the end of postname in the slug or permalink.

    For example I have setup my site to use
    /%category%/%postname%/

    after saving or updating a post my URL becomes

    /category/postname-3

    This number could be any digit from 1 2 3 4 I dont have many posts yet so I am not sure and all my post slugs have one common last word in the permalink xyz-OneCommonWord abc-OneCommonWord or def-OneCommonWord. These become xyz-OneCommonWord abc-OneCommonWord-2 or def-OneCommonWord-3

    I read that there is some problem using category and postname together so I choose Month and Name format but the problem is persistent. I update the posts and its the same URL with a digit again.

    How I can stop this behavior? Is this a well known issue?

  2. westondeboer
    Member
    Posted 4 years ago #

    wordpress will check to see if you have a post with the same name. And if it does, it will add a 2 or 3 after each newer post which has the same subject as another post

  3. Wander
    Member
    Posted 3 years ago #

    Hi there all!

    I'd like to have a similar structure, as shown below

    http://www.site.com/exam1/question1
    http://www.site.com/exam2/question1
    ...even though question1 will be different posts in the categories.

    however, wordpress automatically renames question1 to question1-2 to the postname (field slug), and the permarlink changes to http://www.site.com/exam2/question1-2

    is there a way to repair this problem ?

    Thanks.

  4. webrightnow
    Member
    Posted 3 years ago #

    In reply to the original post, this happens when you trash a post or page and then try to create a new one with the same name. Make sure you empty the trash before setting your permalink and WordPress will stop adding the extra digit.

    Hope this helps.

  5. Jay
    Member
    Posted 3 years ago #

    Emptying the trash, does not work. neither does deleting the "old_slug" from the database or recreating the page.

  6. Jay
    Member
    Posted 3 years ago #

    it appears to happen only when the url ends with a number.

  7. LisaWorkingHard
    Member
    Posted 3 years ago #

    I am having the same trouble. I mptied all trash (pages & posts) and verified that I do not have any existing pages or posts with the same name and still, WP adds a number to the end.

    Example: Pages

    2010 (main page or parent page)
    - 12 (sub-page)
    - - 3 (sub page)

    Any help would be greatly appreciated.

    Thanks,
    lisa

Topic Closed

This topic has been closed to new replies.

About this Topic