Filter a BB Posts module with WP Gridbuilder facets in a regular page (custom query)

BB Posts module set to custom query can be filtered by WPGB Facets as specified in this WPGB doc page (see Page Builders section), but it requires a bit of custom code to ensure compatibility between WPGB Facets and BB Posts module.

  • See custom code below (thanks to WP GridBuilder support for providing most of it).
  • WPGB Facets can also filter a BB Posts module set to main query in an Archive: demo here.
  • In an Archive with a BB Posts module and no WPGB facet, the grid layout is disturbed by WPGB and requires a JS fix: see below.

This method is obsolete since the new BB Add-on by WPGB (April 2022): see demo here

Test article 12

Read More...

Test article 11

Read More...

Test article 10

Read More...

Test article 9

Read More...
Banc ajouré Alt text

Test article 8

Read More...
Fleur de printemps

Test article 7

Read More...

Custom Code

Manually insert WPGB query shortcode (custom query only)
In an HTML module in the layout.

Force WPGB query shortcode to execute at the right time (PHP / custom query only)
Before BB Posts module renders.

Refresh BB grid after WPGB filtering (JS)
To fix equal heights… issues.

Display a loader (CSS)
Fade the grid during filtering and display a loader.

Archive with a BB Posts module and no WPGB Facet: grid geometry fix (JS)
The grid layout is disturbed by WPGB and requires a JS fix on page load, and for Search & Filter if used on the grid.