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.
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
- Install Blockenberg. Install from WordPress.org and activate the plugin.
- Insert the block. Edit a page, click +, search for “Filter Gallery”, insert it. Category: Media.
- Configure inspector controls that exist on this block. Open Items. Set “Title”, “Tags (comma separated)”, “Columns”, “Gap (px)”.
- 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
| Control | What the code does |
|---|---|
| Title | Text field in the inspector. |
| Tags (comma separated) | Text field in the inspector. |
| Columns | Numeric 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 Radius | Numeric range control in the inspector. Range 0–40. block.json default: 8. Saved as `borderRadius`. |
| Image Ratio | Select 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 Titles | On/off toggle in the inspector. On by default. Saved as `showTitle`. |
| Show All Label | Text field in the inspector. block.json default: All. Saved as `showAllLabel`. |
| Filter Style | Select control; the chosen value is saved on the block. Options: Pills; Tabs; Underline. block.json default: pills. Saved as `filterStyle`. |
| Animation | Select control; the chosen value is saved on the block. Options: Fade; Scale. block.json default: fade. Saved as `animation`. |
| Item Title | Shared Blockenberg typography popover (family, size, weight, spacing). Saved as `typoTitle`. |
| Filter Button | Shared Blockenberg typography popover (family, size, weight, spacing). Saved as `typoFilter`. |
| Accent Color | Color control in the inspector. block.json default: #6c3fb5. Saved as `accentColor`. |
| Typography — Background | Color control in the inspector. block.json default: #ffffff. Saved as `bgColor`. |
| Text Color | Color control in the inspector. block.json default: #333333. Saved as `textColor`. |
What the front-end script actually does
- The view script reads HTML data attributes: data-filter, data-tags.
When this is the right block
- Image grid with category filter buttons. Clicking a tag shows/hides matching items with animation — that is the job of Filter Gallery, not a generic content block.
- Use it when you need the editor control labeled “Title”, which exists on this block’s inspector.
- It matches pages about gallery, filter, isotope.
- Inserter grouping: video, animation, and rich media sections.
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
Image Cards
A responsive grid of rich cards with images, category tag, title, description and CTA. Perfect for blog previews, portfolio, services or team showcases.
Image Gallery
Responsive image gallery with grid/masonry layouts, lightbox, and hover effects.
Lightbox Gallery
Image grid where clicking a thumbnail opens a full-screen lightbox with prev/next navigation.
Video Grid
Responsive grid of video cards with play-in-lightbox functionality. Supports YouTube, Vimeo, and self-hosted videos. Custom thumbnails, titles, and duration badges.
Before / After Grid
A grid of interactive before/after image comparison sliders — show multiple transformations, makeovers, or design iterations in one layout.
Gallery Showcase
Featured image with a clickable thumbnail strip — click any thumbnail to swap the main large view. Perfect for portfolio details, product image galleries, and case study illustrations.
Get Blockenberg
Install Blockenberg from WordPress.org, then insert Filter Gallery from the Gutenberg inserter.