Remove the element if empty: can we set a default value for links?

It would make my life so much easier if links could function the same way that content does when it comes to conditionally displaying elements via the block attribute settings.

Currently you can set a default value for content, so that those elements display out the gate when inserting blocks, and hide if there is no content.

The same thing works with links, but there is no field for a default value and they insert into Gutenberg in the hidden state, and that isn’t the intended look in many cases. For buttons or other links that have multiple child elements due to layouts with icons or whatever, the condition needs to be on the link and not the content.

1 Like