Add an option to choose whether or not to render the Template Part wrapper #53760
Labels
[Block] Template Part
Affects the Template Parts Block
[Type] Enhancement
A suggestion for improvement.
What problem does this address?
The block Template Part renders a wrapper element which is not always necessary.
For example, I have a Block Theme where I'd like to display a block that handles the display of the site header inside my Header template part. My block already handles everything (tag name, style and markup options...) and I'd like to get rid of the unnecessary
<div>
(or any other tag chosen) provided by the Template Part block.What is your proposed solution?
I think it would be interesting to be able to choose not to render the wrapper and just display the content inside with an option in the admin and a condition in the block render.
In addition, the
block_template_part()
function (useful in Hybrid Theme) only displays the content inside a Template Part, without the wrapper div. I find this confuses the overall use of Template Parts.The text was updated successfully, but these errors were encountered: