Skip to content

Categories ​

Group a gallery's images so visitors can narrow it down — and understand why they belong to the gallery, not the site.

Categories are how one gallery becomes several. Tag your images Wedding, Portrait and Landscape, switch on the filter bar, and visitors can jump straight to the set they came for without the page reloading.

The model, in one paragraph ​

Categories belong to the gallery, not to your site. Each gallery carries its own list of category names and its own record of which images are in which. Two galleries can use the same word for different things, the same image can be Wedding in one gallery and Landscape in another, and deleting a category in one gallery doesn't touch any other.

Why not WordPress taxonomies?

A taxonomy is one global vocabulary for the whole site. That would mean an image could only ever be tagged one way, deleting a category in one gallery would untag it everywhere else, and images that aren't Media Library attachments — external images and videos — couldn't be tagged at all.

Per-gallery categories avoid all three. The cost is that the same vocabulary is repeated in each gallery that uses it, and there's no site-wide "show me every gallery containing Wedding". For a gallery plugin, that's a good trade.

Creating and assigning ​

Everything happens in the Edit Gallery modal.

  1. Select the gallery and click Edit Gallery on the block toolbar.
  2. In the left sidebar, click Add Category and type a name. This name is what visitors see, so write it for them — Behind the scenes, not bts-2024.
  3. Click that category. The modal enters assignment mode and says so.
  4. Tap images to add or remove them. The count beside the category updates as you go.
  5. Click the category again (or Done) to leave assignment mode.

Faster for a batch: tick several tiles first, then use Bulk actions → Add to category.

Unassigned ​

The sidebar's Unassigned entry lists every image not yet in a category. When it's empty you'll see "All images are assigned to a category." — a useful way to be sure you haven't missed any.

Renaming and deleting ​

Click a category's name to rename it. Renaming is safe: memberships follow the category, and the front end picks up the new label straight away.

Delete removes the category. The images stay in the gallery; they just lose that label. The modal says so before you confirm.

Showing the filter bar ​

Categories do nothing visible until you switch on the filter:

  1. Open Image Filter & Search in the inspector.
  2. Turn on Image Filter.
  3. Choose a Filter Style — Minimal, Button or Dropdown.
  4. Optionally turn on Display Count, and set the label for the All chip.

Full filter and search guide →

Things worth knowing ​

Empty categories don't appear. A category with no images in it is dropped from the filter bar, because a chip that can only produce an empty gallery is noise. Create categories freely; only the populated ones reach visitors.

Counts always match. Filtering happens on the server, so the number beside a chip is the number of images you actually get. That holds with pagination on too — filtering re-pages the filtered set rather than hiding tiles from one page and reporting the wrong total.

Filtering costs nothing extra. Membership is stored with the gallery, so filtering is an in-memory pass — no database queries, however many categories you use.

Two layouts have no filter. Thumbnails and Perspective build their own item model, so the Image Filter & Search panel isn't shown for them. Categories you've assigned are kept; they just aren't used there.

A worked example ​

A photographer's portfolio with 60 images:

  1. Add five categories: Weddings, Portraits, Landscape, Street, Studio.
  2. Bulk-assign in batches — select all the wedding shots, Bulk actions → Add to category → Weddings.
  3. Check Unassigned is empty.
  4. Switch on Image Filter, style Button, Display Count on, Show 'All' on with the label Everything.
  5. Switch on Ajax Pagination at 12 per view, so the page ships twelve images and the rest arrive on demand.

Visitors land on twelve images across every category, click Weddings, and get the wedding set — paged, counted correctly, with no page reload.

Build it step by step →

Where to go next ​