Title: attachment.php not same as single.php?
Last modified: August 19, 2016

---

# attachment.php not same as single.php?

 *  [gudlyf](https://wordpress.org/support/users/gudlyf/)
 * (@gudlyf)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/attachmentphp-not-same-as-singlephp/)
 * I would like to make use of the attachment.php or image.php template file options
   in WordPress, but I’m not sure where I’m going wrong. In short, I simply copied
   my single.php file to attachment.php, then reloaded the page with the attachment(
   image), and the image doesn’t appear. The excerpt (image details) appear below
   where the image should, and the rest of the page looks fine, but the image itself
   doesn’t appear.
 * Is there something special that goes on when one uses single.php for attachment
   display that I’m missing in this file? Seems to me that simply copying single.
   php should do the same thing.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/attachmentphp-not-same-as-singlephp/#post-1341541)
 * The image/attachment template file is not the same as single.php. Have a look
   at the image.php file in the default theme for an example.
 *  [Rev. Voodoo](https://wordpress.org/support/users/rvoodoo/)
 * (@rvoodoo)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/attachmentphp-not-same-as-singlephp/#post-1341542)
 * [http://codex.wordpress.org/Using_Image_and_File_Attachments](http://codex.wordpress.org/Using_Image_and_File_Attachments)
 * Have you read over this part of the codex? It seems that certain things need 
   to occur to determine whether single, image, or attachment.php is used…..
 *  [Mark / t31os](https://wordpress.org/support/users/t31os_/)
 * (@t31os_)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/attachmentphp-not-same-as-singlephp/#post-1341550)
 * Nothing in particular needs to occur, they only need exist, which is one is used
   is determined by the template hierarchy.
 * [http://codex.wordpress.org/images/1/18/Template_Hierarchy.png](http://codex.wordpress.org/images/1/18/Template_Hierarchy.png)
   
   [http://codex.wordpress.org/Template_Hierarchy#Attachment_display](http://codex.wordpress.org/Template_Hierarchy#Attachment_display)
 *  Thread Starter [gudlyf](https://wordpress.org/support/users/gudlyf/)
 * (@gudlyf)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/attachmentphp-not-same-as-singlephp/#post-1341614)
 * Looking at the default theme helped. Thanks for that!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘attachment.php not same as single.php?’ is closed to new replies.

## Tags

 * [attachment](https://wordpress.org/support/topic-tag/attachment/)
 * [image](https://wordpress.org/support/topic-tag/image/)
 * [template](https://wordpress.org/support/topic-tag/template/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 4 participants
 * Last reply from: [gudlyf](https://wordpress.org/support/users/gudlyf/)
 * Last activity: [16 years, 4 months ago](https://wordpress.org/support/topic/attachmentphp-not-same-as-singlephp/#post-1341614)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
