The code in this template enables you to add pagination to images added to create a WordPress gallery as long as they where uploaded to the single post containing the gallery shortcode.
You can also use this template to add pagination to all attachment images uploaded to any specific posts which aren’t displayed in a gallery.
The template displays the image title, description, image and image caption in that order however you can tweak the code to change the order of each element.
The template also enables commenting on each image as seen in the following demo video.
Shows attachment images uploaded to one specific post displaying in a gallery and linked on the single attachment page.
Tested using the Genesis Sample child theme by StudioPress however can be used in any Genesis child theme without the need for modification.
- # Upload the attachment.php file to your child theme folder like this :
- # Optional : Copy & paste the CSS from the style.css file to the end of your child themes style.css file and clear caching.