WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Attachment.php doesn’t seem to work.

[Resolved] Attachment.php doesn’t seem to work.

  • I’ve been uploading images and putting them into posts with the link option set to “page”. I have uploaded attachment.php from the default theme into my theme clicking on the image should load a page with attachment.php template.
    This doesn’t seem to work, clicking an image simply takes you back to the index.php template. The link the image takes you to is /category/post-title/image-title/ (obviously with the relevant category, post title etc. in the link). Does anyone know why this might be happening or any workarounds to display the images in a page rather than on their own as files (I need them in a page to show licensing info and such)

Viewing 2 replies - 1 through 2 (of 2 total)
  • Using %category% in the permalink structure can be tricky…
    Did you try changing your permalink structure?
    (N.B. I tested on a local install and it didn’t work with your permalink structure, however, it worked well with other settings…)
    Maybe it is worth to give it a try.

    Hey, that works. The permalinks are now set to just /post-title/image-title/ and it all loads up fine. On reflection I should be able to leave permalinks as it to keep categorised permalinks, and just change the links manually when I add images.

    Thanks a lot!

    Guess that’s a bug of sorts for someone to have fun with…

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Attachment.php doesn’t seem to work.’ is closed to new replies.
Skip to toolbar