Galleries are a great way of highlighting a series of images such as a recent holiday with your family, a business trip or a review of a product or service.
There are hundreds of WordPress plugins available that allow you to add a gallery to your website, however a plugin is not necessary as WordPress has gallery functionality built directly into the core.
In this tutorial, I would like to show you how easy it is to create a picture gallery in WordPress.
How to Create a WordPress Picture Gallery
The option to create a gallery is located within the “Insert Media” area. You will find this through the “Add Media” button in your post editor.
The option to create a gallery is located just underneath the main option to insert media. You can create a gallery using images that have already been uploaded to your WordPress website. Alternatively, you can upload new images.
Once you have uploaded your images, they will be added to your gallery. Additional images can be added to your gallery from your existing media by selecting them. A tick will be displayed for all images that selected for the gallery.
Once you are happy with the selected images, all you need to do is click on the “Create a new gallery” button.
Galleries can be edited before they are added to your website. In addition to adding captions to images, you can choose whether images link to the attachment page or directly to the image location.
The number of columns defaults to three, however you can choose any number of columns between one and ten. Images can be dragged and dropped into the order you want them to be displayed. You can also display them in random order.
After inserting the gallery into your post or page, you will see one of two things. If you have the visual editor enabled, you will see an image with a large icon of a camera with a picture behind it. An option to edit your image is displayed if you hover over this image
If the visual editor is disabled (i.e. HTML mode), WordPress will insert the gallery into your post or page using the gallery shortcode. As you can see, the ID of each image is listed within the ids attribute.
<img src="http://blog.wphub.com/wp-content/uploads/2014/02/gallery-shortcode.jpg" alt="” width=”550″ height=”28″ class=”aligncenter size-full wp-image-34890″ />
That is all there is to it. Below is an example of how the final gallery looks. Click on any image below to see the image in full.
If you choose too many columns for your content area, the sides of images will be cut off. This is not actually a big problem if you are not using captions, however it squashes everything together too much if you do.
The WordPress gallery feature is the quickest and easiest way of adding a gallery to your website. I recommend using it if you are just looking for basic gallery functionality.
If you are looking to offer visitors a better user experience, I would recommend using a gallery plugin such as NextGEN Gallery instead as it allows visitors to see your images using a lightbox. It also allows to change the styling and add transitions between images.
I hope you enjoyed this quick tutorial. If so, I encourage you to subscribe to WP Hub for future updates.