Custom Attachment Page Template Which Links Attachment Image Back To The Parent Post

This template enables you to customize/modify the default attachment page output for images.

On the attachment page, you can :

  • Set the size of the attachment image
  • Set the text before link
  • Link the image on the attachment page back to the original parent post

In the following example, we only show the attachment page image title, link to parent post and image. All other elements are removed using code in the template which you can remove or modify to show any default elements.

Demo Video #

Shows the image upload to the parent post linked back from the attachment page to the parent posts where it was originally uploaded. Also includes a link back to the parent post with text displaying before the attachment image.

Tested using the Metro Pro child theme by StudioPress however will work in any Genesis child theme.

Code Installation #

There’s only 1 step :

Related Templates

Was This Tutorial Helpful?

Free

$0

Access only to all free tutorials per month.



Monthly

$75

Access to 10 premium tutorials per month.


Tutorial Request


Includes code guarantee and coding support.

Yearly

$500

Access to 15 premium tutorials per month.


Monthly Tutorial Request


Includes code guarantee and priority coding support.