---
title: "How to Create WordPress Image Gallery with Category Filter?"
url: https://nexterwp.com/docs/create-wordpress-image-gallery-with-category-filter/
date: 2023-06-17
modified: 2026-09-14
lang: en
author: "Aditya Sharma"
description: "A gallery of fifty photos is hard to search when a visitor only wants one kind of shot. The Media Listing block can show filter tabs above the gallery so..."
image: https://nexterwp.com/wp-content/uploads/2024/05/create-wordpress-image-gallery-with-category-filter-1024x519.jpg
word_count: 407
---

# How to Create WordPress Image Gallery with Category Filter?

## Key Takeaways

- Nexter Blocks Media Listing block creates a WordPress image gallery with a category filter by selecting Images in the Type section and Repeater in the Content tab.
- Category Wise Filter appears in the Filters tab, and the Category option is only available for Repeater, not for the Carousel layout.
- All Category Text edits the “All” filter label, while Filter Style, Filter Hover Style, and Filter Alignment control the category filter labels’ appearance and placement.

A gallery of fifty photos is hard to search when a visitor only wants one kind of shot.

The Media Listing block can show filter tabs above the gallery so visitors narrow it down in place.

*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**.

- On each item, fill in **Category (Separated by comma)**. Items that share a category are grouped under the same tab.

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

- Open the **Filters** panel and switch **Category Wise Filter** on.

![The Filters panel with Category Wise Filter switched on](https://nexterwp.com/wp-content/uploads/2026/09/media-listing-filters.webp)

- Set **All Category Text** if you want the first tab to read something other than **All**, pick a **Filter Style**, then publish.

![The Filter Style setting](https://nexterwp.com/wp-content/uploads/2026/09/media-listing-filter-style.webp)

![A gallery with All, Mountains, Coast and Waterfalls filter tabs](https://nexterwp.com/wp-content/uploads/2026/09/media-listing-fe-filter.webp)

## How It Behaves

- The tabs are built from the categories you typed on the items, in the order they first appear.- Clicking a tab hides everything outside that category without reloading the page. Selecting **Coast** in a nine photo gallery leaves only the three Coast photos on screen.- An item with several comma separated categories appears under each of them.- The first tab shows everything, and its label comes from **All Category Text**.

![The same gallery after clicking the Coast tab, showing only the three Coast photos](https://nexterwp.com/wp-content/uploads/2026/09/media-listing-fe-filter-coast.webp)

## Limitations

- **Pro only.**- The filter needs **Repeater** content. Images picked under **Normal** have no category field, so no tabs appear.- The filter does not appear on the **Carousel** layout.- Categories are free text on each item, so *Coast* and *coastal* create two separate tabs.- The filtering happens in the browser, so every photo still loads with the page.

## Troubleshooting

### Only the All tab shows

The items have no categories yet. Fill in **Category (Separated by comma)** on each repeater item and the tabs appear.

### No tabs at all

Check two things: **Select Option** must be **Repeater**, and **Layout** must not be **Carousel**.

### One photo is under the wrong tab

Look for a typo or a stray space in that item's category. Each distinct spelling becomes its own tab.

## Related Docs

- [Gallery with repeater items](https://nexterwp.com/docs/create-wordpress-image-gallery-with-repeater/)- [Custom link on each image](https://nexterwp.com/docs/create-wordpress-image-gallery-with-custom-link-to-each-image/)- [Media Listing block: all settings](https://nexterwp.com/docs/add-media-listing-in-wordpress/)