Tutorials

How to Add a Photo Gallery to your WordPress Sidebar

Updated

Written by

Dave Warfel

Reading Time

4 minutes

If you buy something from one of our links, we may earn a commission.

With the upcoming release of WordPress 4.9, adding a photo gallery to your WordPress sidebar will become much easier. WordPress 4.9 adds a new Photo Gallery Widget to a growing list of available sidebar widgets.

In this tutorial, I’ll explain how to add a photo gallery to your WordPress sidebar using this new widget, as well as cover a few other options that provide even more flexibility.

Different ways to add a photo gallery to your sidebar:

  1. Using the WordPress Photo Gallery Widget
  2. More options coming soon…

01WordPress Photo Gallery Sidebar Widget

NOTE: This method requires WordPress 4.9 or later.

In your WordPress admin area, navigate to Appearance > Customize.

You could also do this from Appearance > Widgets, but the Customizer will provide you with a live preview.

Appearance > Customize navigation

Click on the section titled Widgets.

Depending on your WordPress theme, you might have a few sidebar locations in which you can add widgets. Choose the location in which you want to add a photo gallery.

In my example, I’m going to add a photo gallery to the Sidebar widget area.

List of WordPress widgets available

Now click the + Add a Widget button.

Add a Widget button in WordPress Customizer

Type in “gallery” in the search box to quickly locate the Gallery widget. Add this widget to your sidebar by clicking on it.

WordPress photo gallery widget
Type “gallery” in the search box. Click on the “Gallery” widget.

Now you should see an empty photo gallery widget. To add images to your gallery, click the Add Images button.

WordPress photo gallery widget, add photos button
Begin adding images to your gallery widget

To choose images for your photo gallery, simply click on all the images you’d like to add. You can also switch to the Upload Files tab to upload new images. When you’re finished, click Create a new gallery.

WordPress photo gallery add images
Click on as many images as you’d like.

You are now presented with several options for your sidebar photo gallery. Let’s run through each one.

WordPress photo gallery settings
Various options to customize your WordPress photo gallery.
  • Re-order your images: Simply drag and drop your images to re-order them
  • Image captions: Captions are optional, but will appear below each image in your gallery if you choose to add them. Just type them in “Caption this image…” box below each image.
  • Link To: This is what happens to the image when someone clicks on it.
    • Attachment page: This links to a specific page dedicated to your image, and might include additional details about the image. Most websites will not want this option.
    • Media file: This will open the original image in its entirety. If you want visitors to be able to see the full, large-sized image, choose this option.
    • None: The image will not be clickable.
  • Columns: Choose how many columns your images should be displayed in. The more narrow your sidebar area, the fewer columns you should use. I recommend either 2 or 3 columns.
  • Random Order: Checking this box will display your images in a random order.
  • Size: This is the size of image that will be used in your photo gallery. Typically, you’ll want to use either the Thumbnail or Medium sized image.

When you are finished adjusting your gallery settings, click the Insert gallery button.

Photo Gallery Widget Title

A title is optional, but it will appear directly above the photo gallery in your sidebar. Just enter a title into the box labeled Title.

WordPress photo gallery widget title
Photo gallery title is optional. Enter anything you’d like.

Schedule or Publish Your Sidebar Photo Gallery

The final step is to either Publish your photo gallery immediately, or schedule it to go live in the future. In the top-left corner of the Customizer, look for the Publish button. It might also say Schedule.

WordPress photo gallery widget publishing options
How to publish or schedule your photo gallery.

If you want to change when the photo gallery goes live, click on the settings icon to the right of the word Schedule or Publish.

Check out our article on how to schedule Customizer changes for more detailed instructions.

This is by far the easiest way to add a photo gallery to your WordPress sidebar without a plugin. If you’d like even more options for your gallery, read on to learn about a few sidebar photo gallery plugins.


Plugin options are coming soon.

Dave Warfel

LinkedIn  •  X (Twitter)Dave has been working with WordPress since 2011. He's built 100s of client sites and almost a dozen of his own. He's tested almost every plugin you can think of, hosted with at least 10 different companies, and gone down every SEO rabbit hole you can imagine. When's he's not tinkering with new software, you'll find him in the mountains of Colorado, trail running, summiting peaks, and rippin' downhills on his mountain bike. 🏔️🏃🚴🤸

Leave a Comment