Hi everyone,
I’ve been trying to implement something like this for a while, but I’m not sure what the most efficient approach would be.
I usually build my website content using ACF custom fields, and I’d like to be able to define which HTML heading tag (h1, h2, h3, etc.) should be used directly from those fields.
For example, having a selector like this:
And then, in my Heading component, defining the HTML tag dynamically based on the value of that custom field.
At the moment, this doesn’t seem to be possible:
Right now, the workaround I’m using is creating 6 different heading elements and using conditional visibility to decide which one is shown, but this approach is quite uncomfortable to maintain and scale.
Has anyone faced a similar use case? Is there a cleaner or more efficient way to handle this?
Thanks!

