I am putting together a little gallery/portfolio for a friend’s work and I am struggling to work out where a plugin starts and theme begins.
I’m trying to achieve a simple grid of images which link to a detailed view. Inside the detailed view it is just the image, a little description and then a zip download button.
How can I do this with WordPress?
You can use the built-in functionality to solve this: The WordPress Gallery. Each post and page (and normally custom types) can have files of all kind attached to it. You upload them through the Add Media button, and have the option to make a Gallery with the images attached to this post/page or with other library images.
When you insert a Gallery in a post/page, it will display as a grid of images that will link to the attachment page or the image itself.
Here’s when plugin and theme play their part. There are plugins to open the images in a overlay effect (“Lightbox“), others that manipulate the default gallery (Jetpack) and others that do the gallery with their own interface/style.
With the default gallery, the theme files used are this, and they are used in order: if
1)
exists, it is used, otherwise2)
is used, if not exists,3
and so on.Let’s say in you theme the file
attachment.php
is going to be used to show the detailed view. You can add the link to the zip file in the image description, and have this template file to print the description. Some posts about images description here in WPSE.