• I believe this is a relatively new problem, i.e. I think there has been a change in the core that created anomalous behavior.

    We usually use %postname% for our permalink structure. Some of our sites have a post and a page with the same name. As I recall, this did not create a problem in the past; the second one to get created would have a -1 added to the permalink and everything worked without problem.

    With the latest version of wordpress, both the post and the page get assigned the same permalink. So, if I set up a blog page that is pulling excerpts of posts, the title and readmore links on the blog end up showing the page rather than the post. Using the handy edit link from the wp admin bar ends up editing the page rather than the post… so when you go back to the original blog page you see no change.

    I consider this a bug. Has anyone else noticed this anomalous behavior?

Viewing 2 replies - 1 through 2 (of 2 total)
  • s I recall, this did not create a problem in the past;

    That’s because there was no preset %postname% permalink structure previously and, for performance reasons, people were recommended to avoid adding it manually. Now that the performance issues have been resolved, the pre-existing conflict between pages and posts with identical titles has now become more apparent. Nothing has changed in this respect. There has always been an issue with this – which is why most WP-savvy people will avoid using %postname% but for now, all you can do is either take a leaf from their books and use one of the numerically based permalink structures or ensure that you never have a page and a post with the same title.

    Thread Starter cwgservices

    (@cwgservices)

    Thanks for the clarification, esmi. I still think it’s a bug 😉

    I guess that I have always had unique names for pages and posts, so it has not been an issue for me in the past. I have almost always used %postname% in order to have simple urls.

    I am now recommending that my clients use %category%/%postname% which makes the url for the post different from the url for the page if the same name is used. However I think the test for slug uniqueness when adding a new post or page should not be restricted by post type…that would be a very simple change and would resolve this issue completely.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Post and Page with same name => WordPress gets mixed up’ is closed to new replies.