• Resolved FishDogFish

    (@fishdogfish)


    Some of my post have an extra hyphen and a number on the end of the URL, like -2 or -3.

    Why is WP adding this to some of my post’s URLs?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter FishDogFish

    (@fishdogfish)

    I’m not sure, but I think WordPress is adding the number of comments on the posts to the end of the URL.

    The thing is, I don’t want it there. How do I stop WP from adding the number of comments to the end of my URLs?

    FishDogFish,

    If I’m not mistaken this number represents a second post by the same name. For example: a post named “myAwesomePost” cannot exist twice. WordPress therefore would append the name of a second post by the same name like “myAwesomePost-2” and so on. This is the case even if you have trashed that inital “myAwesomePost” post.

    All posts need unique names.

    Thread Starter FishDogFish

    (@fishdogfish)

    How do I get rid of the reference to the trashed post?

    Is it a backup version that’s on my server, or is it an internal reference set by wordpress?

    From Edit Post select “Trash” from the in-page navigation. You can permenantly delete the old posts there. Once you’ve done that head back and edit the post that has -2 in the url and click “edit” next to the permalink to remove the bit that you don’t want. Save and the Update.

    I don’t think deleting from the Edit Post will delete the posts from the database.

    The only way I found to delete them permanently so you will not get the added numbers is to delete them from the database directly.

    You will find all the posts plus a number of revisions that can be deleted.

    Michael

    It is worth a shot. I’m using 2.9.2 and permenantly deleting them from the trash let me change a URL to one that was previously taken. This is from the list of trashed items, not the post editing screen.

    Thread Starter FishDogFish

    (@fishdogfish)

    @nathan12343

    Deleting the trashed posts from trash, and editing the URLs worked.

    Thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Extra hyphen and number on post URLs’ is closed to new replies.