If I go to Media Library and upload an image called
And then I create a post called
The link does NOT take me to the post. Instead the link will take me to a page displaying the media (In other words, it uses a page template instead of single.php)
So does Wordpress NOT allow images and post slugs to be the same? How do I fix this problem? Do I have to rename all of my images?
http://127.0.0.1/?attachment_id=592> I see the attachment page which uses a single.php template ----- However, when I go to view the post
http://127.0.0.1/apple-pie> I see a page displaying the media (instead of a post) and it uses a page template ----- So are these two different types of "attachment pages" ? Why would WordPress make TWO attachment pages? And is it best practice to name images different from post slug?
attachment. So either you are doing something wrong, using plugin or theme function. Otherwise it should work. Try it with disabled plugins or preferably on a fresh install with twentyfourteen theme.