Documentation
Filter Grid for Divi 5 adds one module to the Divi 5 builder: a grid of posts, pages or custom post types that visitors filter, search and paginate without reloading the page. This guide covers installation, every setting and the hooks available to developers.
Requirements
| Software | Version |
|---|---|
| Divi | Divi 5, as the theme or the Divi Builder plugin |
| WordPress | 6.5 or later (tested up to 7.1) |
| PHP | 7.4 or later (tested up to 8.3) |
The module is built for the Divi 5 API only. It does not run with Divi 4.
Installation
- Download the plugin zip file from your Divi Marketplace account.
- In WordPress, go to Plugins → Add New Plugin → Upload Plugin, choose the zip file and click Install Now.
- Click Activate.
Updates are delivered through the Divi Marketplace, in your WordPress dashboard, like other Divi products. If Divi 5 is not active, the plugin shows a notice and the module stays hidden until it is.
Add the module to a page
- Open a page with the Divi 5 builder.
- Click the + button in a column and search for Filter Grid.
- In Content → Source, choose the post type to show.
- In Content → Filters, tick the taxonomies visitors can filter by.
- Choose a pagination style, adjust the design, then save the page.
The preview in the builder is rendered by the same code as the live page, so what you see is what visitors get. The module also works inside Divi Theme Builder templates.
Content settings
The Content tab sets what the grid shows and how visitors interact with it.
Source
| Setting | What it does | Choices |
|---|---|---|
| Post Type | Choose which content to show in the grid. | Every public post type of your site |
| Items Per Page | Number of items shown per page (1 to 100). | – |
| Order By | Choose how the items are sorted. | Date, Title, Menu order, Custom field (text), Custom field (number) |
| Order | Choose the sort direction. | Descending, Ascending |
| Custom Field Key | Meta key used when ordering by a custom field. | – |
| Exclude IDs | Comma-separated list of post IDs to leave out. | – |
| Exclude Current Post | Leave out the post or page this grid is displayed on. | – |
Filters
| Setting | What it does | Choices |
|---|---|---|
| Show Filters | Let visitors filter the grid by taxonomy terms. | – |
| Taxonomies | One filter group is shown per selected taxonomy. Taxonomies that do not belong to the chosen post type are ignored. | Every public taxonomy of those post types |
| Filter Style | Show the terms as buttons or in a dropdown. A dropdown always selects a single term. | Buttons, Dropdown |
| Show "All" Option | Add an option that clears the filter. | – |
| "All" Label | Leave empty to use the default translated label. | – |
| Multiple Selection | Let visitors select several terms at once (buttons only). | – |
| Multiple Selection Logic | OR shows items matching any selected term. AND shows items matching all of them. | OR (any term), AND (all terms) |
Search
| Setting | What it does | Choices |
|---|---|---|
| Show Search Field | Let visitors search the grid by keyword. | – |
| Placeholder | Leave empty to use the default translated placeholder. | – |
Elements
| Setting | What it does | Choices |
|---|---|---|
| Show Featured Image | Show the featured image of each item. | – |
| Image Size | Registered image size used for the featured image. | Thumbnail, Medium, Medium large, Large, Full size |
| Show Title | Show the title of each item. | – |
| Show Date | Show the publication date. | – |
| Show Categories | Show the terms of the first filter taxonomy. | – |
| Show Excerpt | Show an excerpt of each item. | – |
| Excerpt Length | Maximum number of words in the excerpt. | – |
| Show Read More Button | Show a link to each item. | – |
| Read More Text | Leave empty to use the default translated text. | – |
Pagination
| Setting | What it does | Choices |
|---|---|---|
| Pagination | Choose how visitors reach the next items. | Page numbers, "Load more" button, Infinite scroll, None |
| "Load More" Text | Leave empty to use the default translated text. | – |
Design settings
The Design tab uses the native Divi 5 controls, with hover states and per-device values where Divi offers them.
| Group | What you can style |
|---|---|
| Grid | Number of columns and gap between cards, set per device (desktop, tablet, phone). |
| Filters | Text, background, border and spacing of the filter buttons and dropdown. |
| Active Filter | Text, background and border of the selected filter. |
| Search Field | Text, background, border and spacing of the search field. |
| Card | Background colour, border, spacing and box shadow of each card. |
| Card Content | Inner spacing of the text part of the card, so the image can stay edge to edge. |
| Image | Border (rounded corners) and box shadow of the featured image. |
| Read More | Text, background, border and spacing of the "Read more" link. |
| Pagination | Text, background, border and spacing of page numbers and of the "Load more" button, plus the current page. |
The module also has the usual Divi groups for the whole module: sizing, spacing, border, box shadow, filters, transform and animation.
Advanced settings
The Advanced tab has the standard Divi options (CSS ID and classes, visibility, position, scroll effects) and custom CSS fields for each part of the grid: filters, filter, active filter, search field, grid, card, card content, image, title, meta, excerpt, read more and pagination.
Filtered URLs
When a visitor filters or searches, the address in the browser changes, so a filtered view can be bookmarked or shared, and the back button returns to the previous view.
| Parameter | Meaning | Example |
|---|---|---|
d5fg_<taxonomy> | Selected terms of a taxonomy, by slug, comma-separated | ?d5fg_category=news,events |
d5fg_s | Search words | ?d5fg_s=coffee |
d5fg_page | Page number (page numbers style only) | ?d5fg_page=2 |
Taxonomy names are shortened in the URL: category becomes d5fg_cat and post_tag becomes d5fg_tag. Page links are real links, so they keep working without JavaScript.
Performance and caching
- The first page of results is rendered in PHP, inside the page HTML. Search engines see the content and visitors never see an empty grid.
- The stylesheet and script (about 16 KB together, no jQuery) load only on pages that use the module.
- Query results are cached for one hour, and the cache is cleared whenever content is published, updated or deleted.
- Caching plugins are supported: if a cached page carries an expired security token, the grid still loads its results.
Accessibility
- Filters are buttons with
aria-pressed, usable with the keyboard. - The number of results is announced to screen readers after each change.
- "Load more" moves the focus to the first new item. Each "Read more" link includes the item title for screen readers.
For developers
PHP hooks
| Hook | Type | Arguments | Use |
|---|---|---|---|
d5fg_post_types | filter | array $types | Post types offered as a source (name => label). |
d5fg_query_args | filter | array $args, array $settings, array $state | WP_Query arguments of every grid query. |
d5fg_filter_terms | filter | WP_Term[] $terms, string $taxonomy, array $settings | Terms shown in a filter group. |
d5fg_card_html | filter | string $html, WP_Post $post, array $settings | HTML of one card. |
d5fg_cache_ttl | filter | int $seconds | How long query results are cached. Default: one hour. |
d5fg_cache_enabled | filter | bool $enabled | Turns the result cache off when false. |
Example: hide an internal post type from the Source list.
add_filter( 'd5fg_post_types', function ( $types ) {
unset( $types['my_internal_type'] );
return $types;
} );
JavaScript event
Each grid dispatches d5fg:updated after new results are shown. event.detail holds the current state (terms, search, page) and the total number of results.
document.addEventListener( 'd5fg:updated', function ( event ) {
console.log( event.detail.total + ' results' );
} );
REST endpoint
Results are loaded from /wp-json/d5fg/v1/query. The module settings travel in a token signed by your site, so visitors cannot change the post type or read content that the grid does not show. Drafts, private and password-protected posts are never returned.
FAQ
Does it work with Divi 4?
No. The module is written for the Divi 5 API, which is why it does not need the Divi 4 compatibility mode.
Can I use it with WooCommerce products or custom post types?
Yes. Every public post type appears in the Source list, including products and post types created with a plugin or in code. Filters on product attributes and price are planned.
Can I filter by custom fields (ACF)?
Not in version 1.0: filters use taxonomies. Ordering by a custom field is supported (Order By → Custom field). Filters on ACF fields are planned.
Can I put several grids on one page?
Yes. Each grid works on its own. If two grids filter the same taxonomy, they share its URL parameter.
The grid shows "No results found" but I have content.
Check that the selected taxonomies belong to the chosen post type, that the items are published, and that they are not listed in Exclude IDs.
Is it translated?
The front-end texts are translation ready, with English and French included. The builder settings are in English.
Changelog
1.0.0
First release.
Support
Open a ticket from the support tab of the product page on the Divi Marketplace. Your licence includes one year of support and updates for unlimited websites.