Skip to content

How to Create WordPress Image Gallery with Repeater Field?

Key Takeaways

  • Nexter Blocks Media Listing block uses the repeater feature to add titles, captions, external links, and categories to each WordPress image gallery image.
  • Media Listing block requires Nexter Blocks to be installed and activated before users add the block on the page and choose Images from the Type section.
  • Repeater items include Upload Image, Title, Caption, Category, Select Icon, and Link fields, and categories can be separated by a comma (,) for a WordPress photo gallery with a category filter.
Table of Contents

Picking images from the Media Library is quick, but it gives you no way to label them.

Repeater content in the Media Listing block adds each photo as its own item, with a title, caption, category and link you control.

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 the Content panel and set Select Option to Repeater.
The Content panel set to Repeater with the Title field for one item
  1. Click + Add Item for each photo, then set its Image, Title and Caption.
  1. Fill in Category (Separated by comma) if you plan to add a filter later.
The Category field on a repeater item
  1. Add a Link on any item that should point somewhere of its own.
The Link field on a repeater item
  1. Set the Layout and Columns as usual, then publish.
A gallery where each photo shows its own title and caption

What Each Item Holds

FieldWhat it does
ImageThe photo for this item
TitleShown on the tile
CaptionSecondary text under the title
Category (Separated by comma)Feeds the category filter; one item can belong to several categories
LinkWhere the tile goes when clicked, if you switch the lightbox off

How It Behaves

  • Repeater items and Normal images are stored separately. Switching Select Option hides one set and shows the other, and nothing is lost either way.
  • Items render in the order they appear in the panel, and you can drag them to reorder.
  • An item with an empty title simply renders without one.
  • Repeater content is what the category filter and custom per item links both build on.

Limitations

  • Pro only.
  • Every item is added by hand, so a large gallery is slow to build and slow to change.
  • Categories are plain text typed per item, not WordPress taxonomy terms, so a typo creates a new category.
  • Item links do nothing while the lightbox is on, because the lightbox takes the click first.

Troubleshooting

The gallery went empty after switching to Repeater

Your photos are still under Normal. Repeater starts empty, so add the items, or switch Select Option back.

Titles and captions do not show

Check Display Title and Display Content in the block settings, and make sure the fields on the item are actually filled in.

Related Docs

Share your Thoughts

Still in Doubt? Let’s Assist You

Have Feedback or Questions?

Join our WordPress Community on Facebook!