---
title: "How to Create WordPress Image Gallery with Custom Unique Link to Each Image?"
url: https://nexterwp.com/docs/create-wordpress-image-gallery-with-custom-link-to-each-image/
date: 2023-06-17
modified: 2026-09-14
lang: en
author: "Aditya Sharma"
description: "A portfolio grid is only useful if each photo leads to the project behind it. The Media Listing block can give every item its own link, so clicking a tile..."
image: https://nexterwp.com/wp-content/uploads/2024/05/create-wordpress-image-gallery-with-custom-link-to-each-image-1024x519.jpg
word_count: 445
---

# How to Create WordPress Image Gallery with Custom Unique Link to Each Image?

## Key Takeaways

- Nexter Blocks Media Listing block adds a custom link to each image in a WordPress photo gallery.
- Repeater in the Content tab uses the Links field for URLs, and the Links option is only available for Repeater.
- Box Link and Force Custom URL in the Extra Options tab make the entire image clickable with a custom link.

A portfolio grid is only useful if each photo leads to the project behind it.

The Media Listing block can give every item its own link, so clicking a tile opens that page instead of the lightbox.

*For every Media Listing setting in one place, see the [Media Listing block guide](https://nexterwp.com/docs/add-media-listing-in-wordpress/).*

[LIVE BLOCK LINK](https://nexterwp.com/nexter-blocks/listing/wordpress-image-gallery/)

## 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

- Add the **Media Listing** block to your page and click **Design from Scratch**.

- In the **Layout** panel, set **Type** to **Images**.

![The Layout panel with the Type setting set to Images](https://nexterwp.com/wp-content/uploads/2026/09/media-listing-type.webp)

- Open the **Content** panel and set **Select Option** to **Repeater**.

![The Content panel set to Repeater with the Title field for one item](https://nexterwp.com/wp-content/uploads/2026/09/media-listing-content-repeater.webp)

- Click **+ Add Item** for each photo, then set its **Image**, **Title** and **Caption**.

- Fill in the **Link** field on each item with the page it should open.

![The Link field on a repeater item](https://nexterwp.com/wp-content/uploads/2026/09/media-listing-repeater-link.webp)

- Back in **Layout**, set **Popup Layout** to **No** so the lightbox stops taking the click.

![The Popup Layout setting set to No](https://nexterwp.com/wp-content/uploads/2026/09/media-listing-popup-layout.webp)

- Open **Extra Options** and switch **Box Link** on so the whole tile is clickable.

![The Box Link setting in Extra Options](https://nexterwp.com/wp-content/uploads/2026/09/media-listing-extra-options.webp)

- Switch **Force Custom URL** on so the item's own link is used, then publish.

![The Force Custom URL setting in Extra Options](https://nexterwp.com/wp-content/uploads/2026/09/media-listing-force-custom-url.webp)

![A gallery where each photo links to its own page](https://nexterwp.com/wp-content/uploads/2026/09/media-listing-fe-custom-links.webp)

## All Three Settings Are Needed

| Setting | Where | Why it matters |
| ------- | ----- | -------------- |
| Popup Layout = No | Layout | While the lightbox is on it intercepts the click and the link never runs |
| Box Link = on | Extra Options | Makes the whole tile clickable rather than just the title |
| Force Custom URL = on | Extra Options | Uses the Link you typed on the item instead of the image file |

## How It Behaves

- Each tile links to the address on its own repeater item, and items with an empty link stay unclickable.- With all three settings in place the gallery has no lightbox triggers left at all.- Links can point anywhere, including other sites, and each item keeps its own open in a new tab setting.- Leaving any one of the three off falls back to the previous behaviour, usually the lightbox.

## Limitations

- **Pro only.**- Links need **Repeater** content. Images picked under **Normal** have no link field.- You cannot have the lightbox and custom links at the same time. It is one or the other per gallery.- Links are typed per item, so a changed URL has to be updated on every item that uses it.

## Troubleshooting

### Clicking a photo still opens the lightbox

**Popup Layout** is still on **Default**. Set it to **No**.

### Clicking opens the image file instead of my page

Switch **Force Custom URL** on in **Extra Options**.

### Only the title is clickable

Switch **Box Link** on so the click area covers the whole tile.

## Related Docs

- [Gallery with repeater items](https://nexterwp.com/docs/create-wordpress-image-gallery-with-repeater/)- [Gallery with a category filter](https://nexterwp.com/docs/create-wordpress-image-gallery-with-category-filter/)- [Media Listing block: all settings](https://nexterwp.com/docs/add-media-listing-in-wordpress/)