• Resolved dev5

    (@dev5)


    Hi,

    I’m creating a new website and so far have 0 posts and just 3 pages. I created a page and noticed when it saved, it appended a -2 to the permalink. There is no other page (only 2 others) with that name, so I don’t understand why it’s doing that. Each time I go into the sidebar and remove it, it’s gone. Then I hit save and it returns. If I change the permalink to anything else, like xyz, it saves that.

    The site permalinks are set to “Post name”.

    What’s going on??? How do I fix this to stop appending stuff?

    WP version: 6.6

    Thanks guys.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Do you happen to have an image with the same name? If you upload an image (say, “Happy Cat”) and then create a page or post with the same title, WP will name the slug “Happy Cat – 2”. Slugs must be unique.

    Thread Starter dev5

    (@dev5)

    @sterndata
    Wow – Steven thank you – that seems to be it! The primary image for the page had the same name. I would have never considered that. To me .php and .jpg are two different species but apparently not to the WP naming convention. Lesson learned.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    When you upload an image, WP creates an “attachment” page using the image’s name. And that page “uses” the slug.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.