Comments Block (legacy): Don't render empty block wrapper#42737
Comments Block (legacy): Don't render empty block wrapper#42737
Conversation
|
From #41807 (comment):
|
IIRC I saw the problem when I added the Comments block inside a Query Loop block (e.g., in the Home template). The block renders empty because Could it be a good idea also to show a warning message if you place this block in an invalid template? Just for the legacy version, I mean (not sure if this is worth the effort). 🤔 |
|
Closing this issue as the Legacy Comments block has been deprecated. |
What?
Follow-up to @DAreRodz #41807 (comment):
Why?
To avoid an empty block wrapper for no content.
How?
By adding a check if
comments_template()'s return value isempty(), and returning an empty string if it is.Testing Instructions
TDB
Screenshots or screencast