Version 0.7 of the Bricks add-on was released on August 19, 2024. This update contains the following improvements and fixes.

Add or overwrite a “No Results” message in Bricks elements

Bricks 'No Results' setting for Posts and Query Loop elements. This setting can be found in the element's Query settings, at the bottom.
Bricks ‘No Results’ setting for Posts and Query Loop elements. This setting can be found in the element’s Query settings, at the bottom.

This update adds support for setting a custom “No results” message or template in Bricks Posts and Query Loop elements. FacetWP will display the element’s messages/template when there are no results after filtering, when using a Search facet, and when a page loads with no results.

The “No results” message/template can also be set programmatically, or overridden, in custom specified conditions if needed. This can also be done in the Bricks Products element, which does not have a “No results” setting.

Bug fixes

This update also contains the following bug fixes:

  • We fixed a compatibility issue with the “Is main query” setting in Bricks Posts, Query Loop, and Products elements.
  • We also fixed a complicated, ongoing bug involving custom Bricks 404 templates not being displayed on non-existent term archives. A previous bug fix for this issue was causing new query detection issues on custom post-type archives, depending on the above-mentioned “Is main query” setting.
  • Bricks 1.8 introduced a new way of dealing with CSS styles for posts in the loop of Bricks elements. It sets a data-query-loop-index attribute (a counter) on each post item and attaches dynamic CSS to it that is set in the Bricks element, like for example a CSS background image that is unique for each post (e.g. a featured image). The value for this attribute is always incremented from 1, 2, 3 …, also after filtering with facets, when the post order has changed. Because the CSS using the counter stays the same, this resulted in wrong styles (e.g. background images) on posts. This update fixes this issue by getting the re-generated Bricks CSS styles from the AJAX response and injecting them into the page on each facet refresh.

See also

Last updated: September 12, 2024