Skip to content

How to Create WordPress Photo Gallery Grid?

Key Takeaways

  • Media Listing block in Nexter Blocks Pro builds a photo grid from Media Library images, and the column count is set separately for desktop, tablet, and mobile.
  • Grid layout keeps every tile in a row the same height, so rows line up even when photos have different shapes, but tall photos are cropped at the top and bottom.
  • Clicking a photo opens it in the lightbox unless Popup Layout is set to No, and grid images added under Normal do not have individual titles or links.
Table of Contents

A plain grid is still the clearest way to show a set of photos.

The Media Listing block in Nexter Blocks Pro builds one from your Media Library images, with the column count set separately for each screen size.

For every Media Listing setting in one place, see the Media Listing block guide.

Before You Start

  • Edition: Pro — the Media Listing block is part of Nexter Blocks Pro.
  • Block to enable: Media Listing, switched on under Nexter > Blocks in your WordPress dashboard.
  • Your images uploaded: add them to the Media Library first so you can pick them straight from the block.

Steps

  1. Add the Media Listing block to your page and click Design from Scratch.
  1. In the Layout panel, set Type to Images.
The Layout panel with the Type setting set to Images
  1. Open Content, leave Select Option on Normal and pick your images.
The Content panel with Select Option set to Normal
  1. Still in Layout, set Layout to Grid.
The Layout setting with Grid selected
  1. In Columns Manage, set Columns, then use the device icons to set a smaller count for tablet and mobile.
The Columns dropdown in the Columns Manage panel
  1. Adjust Columns Gap/Space for the spacing between tiles, then publish.
A photo gallery laid out as an even grid

How It Behaves

  • Every tile in a row is the same height, so rows line up even when the photos are different shapes.
  • Each device keeps its own column count, so a four column desktop gallery can show one column on a phone.
  • Clicking a photo opens it in the lightbox unless you set Popup Layout to No.

Limitations

  • Pro only.
  • Tiles are cropped to a shared height, so tall photos lose some of the top and bottom. Use masonry if you want each photo shown whole.
  • Grid images added under Normal have no individual titles or links. Switch to repeater content for that.

Troubleshooting

The gallery shows one photo per row

You are looking at the mobile column count. Switch the device icon next to Columns to desktop and set the count there.

Photos look cropped

That is how the grid keeps rows even. Either accept the crop, raise Display Image Size in Extra Options, or switch to masonry.

Related Docs

Share your Thoughts

Still in Doubt? Let’s Assist You

Have Feedback or Questions?

Join our WordPress Community on Facebook!