Media · Gutenberg

Filter Gallery block for WordPress

Image grid with category filter buttons. Clicking a tag shows/hides matching items with animation.

Get Blockenberg

Free Gutenberg block in Blockenberg. The inspector controls and front-end behavior on this page come from this block’s source, not a shared stub.

Get Blockenberg

What it actually does

Image grid with category filter buttons. Clicking a tag shows/hides matching items with animation.

Inspector panels on this block: Items, Layout, Filter Bar. Those titles come from index.js, not from a shared template.

Behavior controls: “Image Ratio” options: Square 1:1, 4:3, 16:9, 3:4 Portrait; “Filter Style” options: Pills, Tabs, Underline; “Animation” options: Fade, Scale.

Where to find it

Gutenberg inserter → Media → search “Filter Gallery” (block name `blockenberg/filter-gallery` in block.json). Style it in the sidebar after insert.

How to use Filter Gallery block for WordPress

  1. Install Blockenberg. Install from WordPress.org and activate the plugin.
  2. Insert the block. Edit a page, click +, search for “Filter Gallery”, insert it. Category: Media.
  3. Configure inspector controls that exist on this block. Open Items. Set “Title”, “Tags (comma separated)”, “Columns”, “Gap (px)”.
  4. Check the published page. The view script reads HTML data attributes: data-filter, data-tags. The block editor preview may not run the same view script.

Inspector controls from this block’s code

ControlWhat the code does
TitleText field in the inspector.
Tags (comma separated)Text field in the inspector.
ColumnsNumeric range control in the inspector. Range 1–6. block.json default: 3. Saved as `columns`.
Gap (px)Numeric range control in the inspector. Range 0–48. block.json default: 16. Saved as `gap`.
Border RadiusNumeric range control in the inspector. Range 0–40. block.json default: 8. Saved as `borderRadius`.
Image RatioSelect control; the chosen value is saved on the block. Options: Square 1:1; 4:3; 16:9; 3:4 Portrait. block.json default: 1/1. Saved as `imageRatio`.
Show TitlesOn/off toggle in the inspector. On by default. Saved as `showTitle`.
Show All LabelText field in the inspector. block.json default: All. Saved as `showAllLabel`.
Filter StyleSelect control; the chosen value is saved on the block. Options: Pills; Tabs; Underline. block.json default: pills. Saved as `filterStyle`.
AnimationSelect control; the chosen value is saved on the block. Options: Fade; Scale. block.json default: fade. Saved as `animation`.
Item TitleShared Blockenberg typography popover (family, size, weight, spacing). Saved as `typoTitle`.
Filter ButtonShared Blockenberg typography popover (family, size, weight, spacing). Saved as `typoFilter`.
Accent ColorColor control in the inspector. block.json default: #6c3fb5. Saved as `accentColor`.
Typography — BackgroundColor control in the inspector. block.json default: #ffffff. Saved as `bgColor`.
Text ColorColor control in the inspector. block.json default: #333333. Saved as `textColor`.

What the front-end script actually does

When this is the right block

Notes from the implementation

viewScript: this folder’s frontend.js is enqueued on the front end for this block.

FAQ

How do I add the Filter Gallery block in WordPress?

Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Filter Gallery”. It sits under Media. After insert, open Items and set “Title”, “Tags (comma separated)”, “Columns”, “Gap (px)”.

What makes Filter Gallery different from other Blockenberg blocks?

Image grid with category filter buttons. Clicking a tag shows/hides matching items with animation. Inspector labels on this block include “Title”, “Tags (comma separated)”, “Columns”, “Gap (px)”.

Is the Filter Gallery Gutenberg block free?

Yes. Filter Gallery ships inside Blockenberg. Get the plugin from WordPress.org — no paid add-on is required for this block.

Can I style Filter Gallery to match my theme?

Yes. Blockenberg’s shared typography and color panels apply here, plus any block-specific style controls listed on this page (panels: Items, Layout, Filter Bar).

Related media blocks

Get Blockenberg

Install Blockenberg from WordPress.org, then insert Filter Gallery from the Gutenberg inserter.

Get Blockenberg