> Requires: Fundations Pro
The Filter Bar is a Pro block (get-fund/filter-bar) that adds live search and filter controls to any page displaying a list of fundations, events, or organisations. Visitors can filter by keyword, organisation, creator, event, or category without the page reloading.
Why use this
Archive pages with many fundations are hard to navigate without filtering. The Filter Bar lets visitors narrow down the list interactively, which helps on large fundraising platforms.
What it does
The block renders up to five filter controls:
| Control | Filters by | URL parameter |
|---|---|---|
| Search | Fundation title and content | gf_search |
| Organisation | Creator organisation (from user meta get_fund_organisation_title) | gf_org |
| Creator | Specific fundraiser by name | gf_creator |
| Event | The get_fund_event a page belongs to | gf_event |
| Category | The get_fund_category a page belongs to, and its descendants | gf_category |
The Category control only appears when Categories are enabled in Fundations settings. Its dropdown is indented to show the nesting, and selecting a parent category matches every fundation under it and its sub-categories.
When a visitor applies a filter, the block uses fetch() and history.pushState() to update the listing without a full reload. The URL is updated so the filtered view is bookmarkable and shareable. Browser back and forward navigation is supported. Search input is debounced by 400ms.
Pagination links within the swapped content are also intercepted so navigating pages of results stays consistent.
Where it works
The Filter Bar adapts to the archive it sits on. It applies to queries from WordPress Query Loop blocks and Greenshift query blocks, for three post types:
| Archive | Post type | What the filters narrow to |
|---|---|---|
| Fundations | get_fund_action | The matching fundations directly. |
| Events | get_fund_event | The events that contain matching fundations. |
| Organisations | get_fund_org | The organisations that own matching fundations. |
On the Events and Organisations archives, each filter dimension is mapped back through the fundations it matches, so filtering by an event or category on the organisations archive shows only the organisations running pages that match. Queries for any other post type are left untouched.
Multiple Filter Bar blocks can appear on the same page.
How to use it
- Open the page where your fundation archive is displayed in the block editor.
- Find the Filter Bar block in the Fundations block category and insert it above your Query Loop.
- In the block settings panel, toggle which controls to show (Search, Organisation, Creator, Event, Category).
- Optionally set custom labels for each control.
- Adjust styling options (border radius, colors) to match your theme.
- Save and preview.


Settings & options
| Attribute | Type | Default | Description |
|---|---|---|---|
showSearch | boolean | true | Show the search input |
showOrganisation | boolean | true | Show the organisation dropdown |
showCreator | boolean | true | Show the creator dropdown |
showEvent | boolean | true | Show the event dropdown |
showCategory | boolean | true | Show the category dropdown (only renders when Categories are enabled) |
searchLabel | string | (empty) | Label for the search field |
orgLabel | string | (empty) | Label for the organisation dropdown |
creatorLabel | string | (empty) | Label for the creator dropdown |
eventLabel | string | (empty) | Label for the event dropdown |
categoryLabel | string | (empty) | Label for the category dropdown |
borderRadius | integer | 50 | Border radius in pixels |
borderColor | string | #e5e7eb | Border color |
backgroundColor | string | #ffffff | Background color of the controls |
textColor | string | #374151 | Text color |
placeholderColor | string | #9ca3af | Placeholder text color |
What you can and cannot do
- You can show or hide any of the five filter controls independently.
- You can override the label text for each control.
- You can style the controls to match your theme using the color and border options.
- You can place the bar on the Fundations, Events, or Organisations archive; it adapts to each.
- You cannot add custom filter dimensions beyond the five built-in controls.
- You cannot filter by donation amount range or goal completion status.
- The Category control only appears when Categories are enabled in Fundations settings.
- The Organisation filter uses the
get_fund_organisation_titleuser meta field. If your users do not have this meta set, the dropdown will be empty.
Examples
Search only: disable Organisation, Creator, and Event in the block settings. Only the search bar appears. Useful for smaller sites.
Event-based filtering: leave only the Event control enabled and set the label to “Filter by cause”. Pair with a Query Loop filtered to a specific event term for focused browsing.
Troubleshooting
Filters apply but the list does not update. Check that your Query Loop block is on the same page and is set to query get_fund_action post type. The Filter Bar looks for .wp-block-query, [class*="gspb_queryBlock"], or .get-fund-org-card-wrapper containers to update.
The Organisation dropdown is empty. Users need the get_fund_organisation_title user meta populated. This is set through the fundraiser profile. If your site does not use organisations, disable this control in the block settings.
Filtering works on the first visit but breaks after a page reload with filters in the URL. The server-rendered initial page load applies the URL parameters correctly. If you see issues, confirm the Filter Bar block is loading its JavaScript. Check the browser console for errors.
Browser back button does not restore the previous filter state. The Filter Bar uses popstate event handling. If another plugin or theme is interfering with the History API, this may break. Test with other plugins deactivated.
Developer reference
REST API endpoint
The Filter Bar fetches dropdown options via a public REST endpoint:
GET /wp-json/get-fund/v1/filter-options
Response shape:
{
"orgs": ["Org Name 1", "Org Name 2"],
"creators": [
{ "id": 1, "name": "Fundraiser Name" }
],
"events": [
{ "id": 5, "name": "Event Name" }
],
"categories": [
{ "id": 9, "name": "Animals" },
{ "id": 12, "name": "— Dogs" }
]
}
The categories array is present only when Categories are enabled, and its names are indented with a leading em dash to show nesting. The endpoint is unauthenticated, cached, and rate-limited. No nonce is required.
URL parameters
| Parameter | Used for |
|---|---|
gf_search | Keyword search |
gf_org | Organisation name string |
gf_creator | Creator user ID |
gf_event | Event post ID |
gf_category | Category post ID (matches the category and its descendants) |
Query integration hooks
The Filter Bar integrates with the WordPress block query system:
| Hook | Purpose |
|---|---|
query_loop_block_query_vars | Applies filters to WordPress Query Loop |
gspb_module_args_query | Applies filters to Greenshift module queries |
gspb_query_block_args | Applies filters to Greenshift query block args |
The Filter Bar modifies queries for get_fund_action (fundations), get_fund_event (events), and get_fund_org (organisations). Category resolution delegates to the free plugin’s Get_Fund_Block_Editor::get_category_fundation_ids(), so descendant scoping stays consistent between the free templates and the Pro filter.
No additional hooks or filters are exposed by this class.