Getting started

From a fresh install to a published, filterable gallery in about five minutes. You need WordPress 6.6 or newer and PHP 7.4 or newer – nothing else, no account and no API key.

Install the plugin

  1. Download gallery-z.zip from this site.
  2. In WordPress, go to Plugins → Add New → Upload Plugin, choose the zip and click Install Now.
  3. Click Activate.

With WP-CLI it is one line:

wp plugin install gallery-z.zip --activate

Gallery Z works in block themes and in classic themes that use the block editor. There is no settings page: everything is a block setting.

Requirements

NeedsVersionFor
WordPress6.6+The blocks, filters, lightbox and everything on this page
WordPress6.7+The Gallery Category Archive template in block themes
WordPress6.9+The Abilities API for AI agents (skipped on older versions)
PHP7.4+Everything

A filterable gallery is two blocks that know each other: a Gallery Filter (the category buttons) and a Filterable Gallery (the photos). The quickest way to get both, already connected:

  1. Open a page in the editor and press Cmd+K (Ctrl+K on Windows and Linux) to open the command palette.
  2. Type gallery and choose Add filterable gallery. A filter and a gallery appear at the cursor, wired to each other.
  3. In the empty gallery, click Add images and select photos from the Media Library (shift-click to select several).

You can also insert the two blocks from the inserter yourself. Then give the gallery a Gallery ID (Filtering panel) and pick the same gallery in the filter’s Gallery setting – or leave the filter set to “all galleries on the page”.

Give the photos categories

The filter shows one button per Gallery Category used by the photos in the gallery. Categories are stored on the images themselves, in the Media Library, so they follow a photo into every gallery.

  • One image: select it and use the Gallery categories panel in the sidebar.
  • Several images: select one, shift-click the others, then click the tag button in the block toolbar. Tick categories or create new ones right there.
  • Many images at once: use the bulk actions in the Media Library’s list view.

Click Edit in the gallery’s toolbar to see every photo with a badge of its categories. Photos without one get a yellow “No category” badge, so you see at a glance what still needs tagging.

Try the filter

Switch the gallery back to Preview in its toolbar and click the filter buttons in the editor: the gallery filters right there, so you can check the categories before you publish. Nothing is saved by clicking.

Then publish and click a button on the front end. Photos move to their new places with an animated transition. Want a shareable link per category? Set a URL parameter in the filter’s settings, e.g. category, and ?category=food opens the page already filtered.

Where to go next

  • Pick a layout: masonry is the default; justified rows, grid, carousel and accordion are one click away.
  • Turn on the lightbox: set Click behavior to Lightbox in the Items panel.
  • Style the filter with a preset – see Gallery Filter.
  • Coming from another gallery plugin? Import your galleries.