tomusborne / generateblocks

GenerateBlocks is a small collection of lightweight WordPress blocks that can accomplish nearly anything.
https://generateblocks.com
198 stars 23 forks source link

2.0 Query Block improve empty HTML and other blocks HTML. #1487

Closed diggeddy closed 3 days ago

diggeddy commented 6 days ago

Description

A Query that returns no results, without a No Results blocks, outputs empty HTML eg.

<div>
    <div class="gb-looper-cd4aba13"></div>
</div>

The user should be given the option to remove this HTML when no results are returned. In addition to this the user should be able to insert "other" blocks within the Query ( or Looper ) block. This would allow content before / after the loop to be displayed only when a loop has results.

Related to #1486