You can use this attachment page file to create you own custom attachment page for all attachments or just your image attachments.
Simply rename the file to image.php if you only want to use the template to display image attachments.
- Create anew file using a code editor like Notepad++
- Copy the PHP code from the view raw link in the Gist
- Paste the code into the new file
- Name the file attachment.php or image.php
- Upload the file to the root directory of your child theme folder
If you’re looking for idea’s on what you can do with a custom attachment image.php file, take a look in the Twenty Fourteen default theme.