GB Query Filter is a lightweight WordPress plugin that adds customizable front-end filters to the GenerateBlocks Query Loop block. It enables live filtering based on taxonomies, custom fields, sort order, and search terms while maintaining full compatibility with GenerateBlocks 2.0+.
The plugin integrates with a custom block that links directly to the Query Loop, supports optional AJAX filtering, and syncs all filter states to the URL for shareable filter results.
Supports filtering by: Taxonomies - Meta Box Custom Fields & Taxonomies - Search Term
Filter control types include: Select - Checkbox - Radio
Additional filter features: Multiple selections - Default states - Reset button
The plugin registers a custom block that connects to GenerateBlocks' Query Loop. Users can configure: - Post types - Taxonomy filters - Meta key filters - Sort options - Front-end filter behavior - AJAX vs. full-page reload mode
Filter states are synced to the URL using the GB Query Filter naming pattern:
?gbqf_tax[category]=news,events
?gbqf_meta[color]=blue
?gbqf_sort=title_asc
?gbqf_search=steel+railings
On page load, the plugin restores all filter states from the URL.
Two filtering modes are available: 1. Full page reloads 2. AJAX filtering and pagination (if enabled)
- Download the repository ZIP.
- Upload it to WordPress under Plugins → Add New → Upload Plugin.
- Activate the plugin.
- Add the GB Query Filter block to any page containing a GenerateBlocks Query Loop.
- Create or edit a page with a GenerateBlocks Query Loop block.
- Add the GB Query Filter block above the Query Loop.
- Configure the filter settings:
- Link filter to query
- Choose taxonomies
- Choose meta fields
- Set default values
- Enable or disable AJAX
- Publish or update the page.
Examples of URL parameters generated by the plugin:
Taxonomy filters
?gbqf_tax[category]=news,updates
Meta field filters
?gbqf_meta[price]=100-200
Search term
?gbqf_search=modern+stairs
- Uses native WordPress block APIs, REST endpoints, and WP_Query modifications.
- Does not modify GenerateBlocks core.
- Filters only affect the inner post query of the Query Loop block.
- Compatible with caching plugins when AJAX is disabled.
- Designed for extensibility and future integrations.
- Not affiliated with GeneratePress, GenerateBlocks, or GenerateOne
- Use at your own risk
- Additional filter UI layouts
- Range sliders for numbers, price, or dates
- Saved filter presets
- Multiple filter groups per page
Pull requests and issues are welcome. Contributions should follow WordPress coding standards and Git-based workflows.
Licensed under the GPL-2.0-or-later license. You are free to modify, extend, and distribute the plugin.