Webcasata
Filter Gallery
A powerful, flexible image gallery plugin with multi-group dropdown filtering, lightbox, and a developer-friendly template override system.
Contents
01Overview
Webcasata Filter Gallery lets you build beautiful, responsive image galleries where visitors can filter images using custom dropdown menus โ instantly, without any page reload. Images can be tagged across multiple filter groups simultaneously, and filtering uses AND logic across groups with OR logic within a group.
The plugin ships with a WooCommerce-style template override system so theme developers can customise every part of the output by simply placing template files in their active theme folder โ no plugin hacking required.
Zero configuration required. Install, activate, create a gallery, copy the shortcode โ done. Advanced features are available when you need them.
02Features
Multi-Group Dropdown Filtering
Create unlimited filter groups (e.g. Country, Room Type, Category). Each becomes a custom styled dropdown on the front end.
Instant Client-Side Filtering
All filtering happens in the browser โ no AJAX round-trips, no page reloads. Results are immediate.
AND + OR Logic
Selecting Country=India AND Room=Kitchen shows only matching images. Within a group, multiple values use OR โ an image can belong to India AND USA.
Real-Time Title Search
A search box filters images by title as you type, with a 220ms debounce. Works alongside dropdown filters simultaneously.
Built-in Lightbox
Full-screen image viewer with prev/next navigation, keyboard shortcuts (ESC, โ โ), and an optional Visit Link button.
Per-Image URL Links
Assign an external URL to any image. Opens in the same tab or a new tab. If lightbox is on, a “Visit Link” button appears inside it.
Filter Labels on Images
Each image can display its assigned filter values as badge labels. Style them as ribbons, chips, or banners via CSS.
Grid & Masonry Layouts
Equal grid or Pinterest-style masonry. 1โ6 columns with automatic responsive breakpoints for tablet and mobile.
Load More Pagination
Show a set number of images initially, then reveal more on click. Set to -1 to display all images at once.
Slide / Fade Animations
Smooth staggered animations when images appear โ slide up, fade in, or none. Controlled per gallery via shortcode.
Template Override System
WooCommerce-style. Copy template files to your theme to customise the gallery or image card layout completely.
Gutenberg Block
Native block with live preview and a full sidebar control panel โ no shortcode knowledge needed.
Per-Gallery Custom CSS
Add CSS that applies only to a specific gallery, right from the edit screen.
Accessible
ARIA roles on all interactive elements, keyboard-navigable dropdowns and lightbox, screen-reader labels throughout.
Fully Responsive
Mobile-first CSS. Columns automatically reduce on smaller screens. Native loading="lazy" on all images.
Backward Compatible
Galleries created with version 1.x (flat tags) continue working automatically โ no migration needed.
03Getting Started
Step 1 โ Install & Activate
Upload the plugin zip via Plugins โ Add New โ Upload Plugin, then click Activate.
Step 2 โ Create a Gallery
Go to Filter Galleries โ Add New in your WordPress admin. Give the gallery a title.
Step 3 โ Add Filter Groups
In the Filter Groups meta box, click Add Filter Group. Name it (e.g. “Country”), then add values (e.g. “India”, “USA”, “UK”). Drag to reorder. Add as many groups as you need.
Step 4 โ Upload Images
In the Gallery Images meta box, click Upload / Add Images. For each image you can set:
- Title โ displayed below the image on the front end
- Caption โ shown on hover inside the image
- Link URL โ optional external URL (+ new tab option)
- Filter assignments โ multi-select box per group (Ctrl+click for multiple)
Step 5 โ Publish & Copy Shortcode
Click Publish. The shortcode appears in the sidebar โ click Copy and paste it into any page, post, or widget.
[wbfg_gallery id="42"]
42 with your gallery’s post ID (shown in the sidebar after publishing).04Filter Groups
Filter groups are the core concept of the plugin. Think of each group as a dimension you want visitors to filter by.
How Groups Work
| Concept | Explanation | Example |
|---|---|---|
| Group | A filter category โ becomes one dropdown on the front end | Country, Region, Category |
| Values | The selectable options within a group | India, USA, UK, Dubai |
| Assignment | Each image can be assigned multiple values per group | Image โ Country: India + USA |
| AND logic | Across groups โ both conditions must match | Country=India AND Region=South |
| OR logic | Within a group โ any selected value matches | Country=India OR USA |
The order you drag filter groups in the admin is the exact order the dropdowns appear on the front end. Reorder anytime โ changes take effect immediately on save.
Multi-Value Assignment
In the image card, each filter group shows a scrollable <select multiple> box. Hold Ctrl (Windows/Linux) or Cmd (Mac) to select multiple values. This is ideal for groups with 50+ values like countries.
05Shortcode Reference
The shortcode [wbfg_gallery] accepts the following parameters. All are optional except id.
| Parameter | Options | Default | Description |
|---|---|---|---|
id |
Gallery post ID | โ | Required. The ID of the gallery to display. |
columns |
1 2 3 4 5 6 |
3 | Number of grid columns. Responsive breakpoints apply automatically. |
filter |
show / hide |
show | Show or hide the filter dropdowns and search box entirely. |
show_all |
yes / no |
yes | Show “All [Group]” as the first option in each dropdown. |
per_page |
Any number, or -1 |
6 | Images shown on load. -1 shows all images and hides Load More. |
loadmore |
Any number | 6 | How many additional images to reveal per Load More click. |
layout |
grid / masonry |
grid | Equal-height grid or Pinterest-style masonry layout. |
lightbox |
yes / no |
yes | Enable lightbox on image click. If an image has a URL, a Visit Link button appears inside the lightbox. |
animation |
slide / fade / none |
slide | Animation style when images appear (on load and after filter change). |
title |
show / hide |
show | Show or hide the image title text below each image. |
Shortcode parameters override global settings for that specific gallery instance. The same gallery can appear differently on different pages using different shortcode parameters.
06Use Cases & Examples
Partner / Client Directory
Display partner logos filterable by country and region. Each logo links to the partner’s website.
[wbfg_gallery id="42" columns="3" lightbox="no" title="show" per_page="12"]
Real Estate / Interior Design Portfolio
Room type, style, and city as filter groups. Masonry layout suits varied image sizes. Lightbox lets visitors see full quality.
[wbfg_gallery id="55" layout="masonry" columns="3" animation="fade" lightbox="yes"]
Product Showcase
Filter by category and colour. Each image links to the product page. Title shows product name. No lightbox needed.
[wbfg_gallery id="68" lightbox="no" columns="4" title="show" per_page="12" loadmore="12"]
Photography Portfolio
Filter by genre (landscape, portrait, street). All images shown at once in masonry. No title or filter labels needed.
[wbfg_gallery id="71" layout="masonry" columns="4" per_page="-1" title="hide" animation="fade"]
Team / Staff Directory
Filter by department and location. Title shows name, caption shows role. Each image links to a profile page.
[wbfg_gallery id="84" columns="4" lightbox="no" title="show" per_page="-1" filter="show"]
Event / Conference Gallery
Filter by session, speaker, or day. Lightbox for full-size viewing. No filters needed on the embed โ just a clean grid.
[wbfg_gallery id="90" filter="hide" lightbox="yes" columns="3" per_page="9" loadmore="9"]
Restaurant / Food Menu Gallery
Filter by cuisine type and dietary category. Image shows the dish, title is the dish name, caption is the price.
[wbfg_gallery id="96" columns="3" lightbox="yes" title="show" animation="slide"]
Awards & Certifications Wall
Filter by year and category. No lightbox, no filters shown โ just a clean, searchable logo grid.
[wbfg_gallery id="101" filter="hide" lightbox="no" per_page="-1" title="show" columns="5"]
07Template Override System
Like WooCommerce, this plugin allows you to customise the front-end output by placing template files in your active theme. The plugin checks your theme first; if no override is found, it falls back to its own templates.
Template Lookup Order
- Child theme:
child-theme/webcasata-filter-gallery/<template>.php - Parent theme:
parent-theme/webcasata-filter-gallery/<template>.php - Plugin default:
plugins/webcasata-filter-gallery/templates/<template>.php
Available Templates
| Template File | Controls |
|---|---|
gallery-template.php |
The full gallery wrapper โ filter bar, dropdowns, search box, image grid, load more button, lightbox. |
image-card.php |
A single image card in the grid โ image, title, caption, filter labels, lightbox trigger or link. |
How to Override
Create this folder in your active theme:
Copy the template file(s) you want to customise from the plugin’s templates/ folder into that folder, then edit freely.
Do not edit plugin template files directly โ your changes will be lost on plugin update. Always use the theme override folder.
Variables Available in image-card.php
All of these PHP variables are available in your overridden image card template:
$imageFull image data array
$idAttachment ID
$urlThumbnail URL
$full_urlFull-size URL
$titleImage title
$captionCaption text
$link_urlExternal URL
$link_new_tabbool โ new tab
$filters[‘Group’ => [‘Val’]]
$gallery_idParent gallery ID
$indexPosition in loop
$is_hiddenBeyond per_page?
$lightboxLightbox enabled?
$show_titleTitle visible?
Filter Labels Example
To output the assigned filter values as ribbon badges in your template override:
<?php // Output all filter values as badges ?>
<?php foreach ( $filters as $group_name => $values ) : ?>
<?php foreach ( $values as $val ) : ?>
<span class="fig-filter-label">
<?php echo esc_html( $val ); ?>
</span>
<?php endforeach; ?>
<?php endforeach; ?>
<?php // Output only a specific group ?>
<?php if ( ! empty( $filters['Country'] ) ) : ?>
<span class="fig-ribbon">
<?php echo esc_html( $filters['Country'][0] ); ?>
</span>
<?php endif; ?>
Developer Hooks
The template system fires these WordPress hooks around every template load:
// Before a template is included
do_action( 'fig_before_template', $template_name, $path, $args );
// After a template is included
do_action( 'fig_after_template', $template_name, $path, $args );
// Modify variables passed to any template
add_filter( 'fig_template_args', function( $args, $template_name, $path ) {
// Add a custom variable to every image-card.php
if ( 'image-card.php' === $template_name ) {
$args['my_custom_var'] = 'hello';
}
return $args;
}, 10, 3 );
08Plugin Settings
Go to Filter Galleries โ Settings to configure global defaults that apply to all galleries. Any setting can be overridden per gallery using shortcode parameters.
| Setting | Description |
|---|---|
| Show “All” Option | Toggle “All [Group]” as the first option in every dropdown. |
| Enable Lightbox | Global default for lightbox. Override with lightbox="no" in shortcode. |
| Default Layout | Equal Grid or Masonry โ applied to all galleries unless overridden. |
| Default Columns | 2โ6 columns. Shortcode columns param overrides this. |
| Filter Animation | Slide Up, Fade In, or None. |
| Images on Page Load | Initial image count. Set to -1 to show all with no Load More. |
| Load More Count | How many images to reveal per Load More click. |
| Dropdown Background | Colour of inactive filter dropdown buttons. |
| Active / Selected Colour | Colour of the selected filter dropdown and Load More button. |
| Dropdown Text Colour | Text colour on the active/selected dropdown state. |
| Global Custom CSS | CSS applied to all galleries site-wide. |
Each gallery also has its own Per-Gallery CSS box on the edit screen, scoped to that gallery’s unique ID โ so you can style individual galleries without affecting others.
09Frequently Asked Questions
Can one image belong to multiple filter values?
Yes. In the image card, each filter group shows a multi-select box. Hold Ctrl (or Cmd on Mac) and click to select multiple values. A cuisine photo can be tagged India and USA โ it will appear when either country is selected.
How do I show all images without a Load More button?
Set per_page="-1" in the shortcode, or set Images on Page Load to -1 in the Settings page. The Load More button is automatically hidden.
Can I use the same gallery on multiple pages with different settings?
Yes โ shortcode parameters override global settings per instance. The same gallery ID can be used on two different pages with completely different column counts, animations, or visible filters.
Does filtering use AJAX?
No. All images are rendered into the page on load (hidden beyond the initial count). Filtering, search, and Load More all run entirely client-side in JavaScript โ making them instantaneous.
My theme overriding image-card.php works but gallery-template.php does not โ why?
Make sure you are using version 2.1.0 or later. Earlier versions had a hardcoded include for gallery-template.php that bypassed the template locator. The fix was shipped in 2.1.0.
Can I use the gallery without any filter dropdowns?
Yes โ use filter="hide" in the shortcode. This hides all dropdowns and the search box, showing a clean image grid with lightbox, titles, and pagination only.
Is the plugin compatible with page builders?
Yes. Use the shortcode in any page builder text/shortcode widget (Elementor, Divi, WPBakery, etc.). A native Gutenberg block is also included for the block editor.
What is the keyboard shortcut inside the lightbox?
ESC closes the lightbox. โ Arrow goes to the previous image. โ Arrow goes to the next image.
Can I change the colour of the filter buttons?
Yes โ go to Filter Galleries โ Settings โ Filter Dropdown Colours. You can set the inactive background, active colour, and text colour using colour pickers.
Does it work with child themes?
Yes. The template locator checks the child theme first, then the parent theme, then falls back to the plugin’s own templates.