← All plugins
Hide When Empty
No content, no section.
Tick one box and a section disappears from the page when it renders no text, no media and no other element. It checks what the section actually renders, children included, so a section whose elements are all hidden by conditions or empty dynamic data goes too. Find it under Hide when empty on the Content tab of a Section.
Each case below has two identical probe sections. The first has the box off & shows as a dashed outline. The second has it on. The result line reads the live page, so it tells you what actually happened.
Case A
An empty section.
A section with an empty container inside. Nothing to show, nothing to keep.
…
Case B
Dynamic data with nothing in it.
A Text element bound to , and this page has no excerpt. Bricks can hide one element on one empty tag. Here the whole section goes.
…
Case C
Every element hidden by a condition.
The only element inside has a Bricks condition that never passes (the post ID must equal 0). The element does not render, so the section has nothing left.
…
Case D
A query loop with no results.
A loop over a post type that has no posts. Bricks can hide an element on 0 for one loop. Here the section simply notices there is nothing in it, however many loops it holds.
…
Case E
A heading, but the list is missing.
Each section keeps a heading and an intro line, so the empty check alone would keep it. The second one has the box ticked and Or hide when this is missing set to .pg-card, and its card list has no results, so nothing matches and the whole section goes.
…
Related cards
Kept sections
Anything real stays.
All three sections below have the box ticked & all three stay. One has text, one has only an image, one has only a divider. Media & other drawn elements count as content even with no text.
…
Text only. Kept.
