Title: Template attachments
Last modified: July 28, 2022

---

# Template attachments

 *  [alexcc1](https://wordpress.org/support/users/alexcc1/)
 * (@alexcc1)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/template-attachments/)
 * I have created an attachment.html template but it does not load any file.
 * What do I need for this to work?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ftemplate-attachments%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [Alvaro Gómez](https://wordpress.org/support/users/mrfoxtalbot/)
 * (@mrfoxtalbot)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/template-attachments/#post-15867027)
 * Hi [@alexcc1](https://wordpress.org/support/users/alexcc1/)!
 * Could you please share more details on how you went about creating this attachments
   page?
 * Also, could you clarify what you expected to happen vs. what you are seeing?
 * Thank you!
 *  Thread Starter [alexcc1](https://wordpress.org/support/users/alexcc1/)
 * (@alexcc1)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/template-attachments/#post-15868983)
 * I have created the template in the theme directory and customize it in the editor.
 * wp-content/themes/twentytwentytwo/templates/attachment.html
 * Clicking on the attachments should load them on the custom page created, but 
   it doesn’t load the content.
 *  Moderator [Kathryn Presner](https://wordpress.org/support/users/zoonini/)
 * (@zoonini)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/template-attachments/#post-15878158)
 * [@alexcc1](https://wordpress.org/support/users/alexcc1/) Do you have a Post Content
   block inside a Query Loop within your Attachment template? That would be required
   to output any post content – in this case, your media file.
 *  Thread Starter [alexcc1](https://wordpress.org/support/users/alexcc1/)
 * (@alexcc1)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/template-attachments/#post-15879367)
 * [@zoonini](https://wordpress.org/support/users/zoonini/) Yes, I have the post
   content block in attachment.html
 * [https://i.imgur.com/iiCfyR1.jpg](https://i.imgur.com/iiCfyR1.jpg)
 *  Moderator [Kathryn Presner](https://wordpress.org/support/users/zoonini/)
 * (@zoonini)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/template-attachments/#post-15881443)
 * [@alexcc1](https://wordpress.org/support/users/alexcc1/) Thanks for confirming.
 * I did some testing and looking around the Gutenberg GitHub repository, and it
   looks like this is a known issue with block themes, being tracked here:
 * [https://github.com/WordPress/gutenberg/issues/29887](https://github.com/WordPress/gutenberg/issues/29887)
 * Support for the creation of more template types, including attachment, is coming
   in the future:
 * [https://github.com/WordPress/gutenberg/pull/39353](https://github.com/WordPress/gutenberg/pull/39353)
 * If you need this functionality before then, you might need to switch to a non-
   block theme, such as Twenty Twenty-One.
 * Wish I had better news for you, but this is the situation for the moment. Cheers.

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

The topic ‘Template attachments’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/twentytwentytwo/2.1/screenshot.
   png)
 * Twenty Twenty-Two
 * [Support Threads](https://wordpress.org/support/theme/twentytwentytwo/)
 * [Active Topics](https://wordpress.org/support/theme/twentytwentytwo/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/twentytwentytwo/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/twentytwentytwo/reviews/)

## Tags

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

 * 5 replies
 * 3 participants
 * Last reply from: [Kathryn Presner](https://wordpress.org/support/users/zoonini/)
 * Last activity: [3 years, 10 months ago](https://wordpress.org/support/topic/template-attachments/#post-15881443)
 * Status: not resolved