# Dymanic headings in for gutenberg blocks? possible

**URL:** <https://forum.pinegrow.com/t/dymanic-headings-in-for-gutenberg-blocks-possible/10915>\
**Category:** WordPress\
**Tags:** wordpress\
**Created:** [July 6, 2025, 6:33pm UTC](https://forum.pinegrow.com/t/dymanic-headings-in-for-gutenberg-blocks-possible/10915 "2025-07-06T18:33:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![pixaful](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/pixaful/32/6721_2.png) [@pixaful](https://forum.pinegrow.com/u/pixaful)\
**Post date:** [July 6, 2025, 6:33pm UTC](https://forum.pinegrow.com/t/dymanic-headings-in-for-gutenberg-blocks-possible/10915/1 "2025-07-06T18:33:17Z")

</div>

Hi everyone

I have been tearing my hair our trying to get dynamic headings working as an option with Gutenberg blocks

I am using pinegrow 8.5 with tailwind 3. My aim is to create a custom gutenberg block with an image, a couple of buttons, a content area with rich text so peopel can add a few paragraphs of content.

So far so good!

But the icing on the cake would be to allow the user to choose a heading level, say H1, H2 or H3, then the correct heading with its tailwind classes is displayed to the user on the front end.

I have been asking chatgpt to help but its not been helpful

This is a screenshot of my aim

> **[C:\\Users\\hayde\\OneDrive\\Desktop\\pgtwstart\\blocks.html - Pinegrow Web Editor -...](https://app.screencast.com/Scyc9BSuqIREr)**
>
> World's leading screen capture + recorder from Snagit + Screencast by Techsmith. Capture, edit and share professional-quality content seamlessly.

You can see I have three headings, and i want the user to choose via a select and then corresponding heading is shown, what is the simplest way to get this working?

This is something I really want to nail down as it would be good to do this across all my blocks for SEO

Thank you so much!

Hayden

---

<div class="post-metadata">

**Author:** ![PeteSharp](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/petesharp/32/7134_2.png) [@PeteSharp](https://forum.pinegrow.com/u/PeteSharp)\
**Post date:** [July 6, 2025, 9:32pm UTC](https://forum.pinegrow.com/t/dymanic-headings-in-for-gutenberg-blocks-possible/10915/2 "2025-07-06T21:32:25Z")

</div>

You could use the Block Inner Content for this.

---

<div class="post-metadata">

**Author:** ![Riccarcharias](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/riccarcharias/32/4051_2.png) [@Riccarcharias](https://forum.pinegrow.com/u/Riccarcharias)\
**Post date:** [July 7, 2025, 5:36am UTC](https://forum.pinegrow.com/t/dymanic-headings-in-for-gutenberg-blocks-possible/10915/3 "2025-07-07T05:36:16Z")

</div>

Hey, this should be possible with block attributes: [Adding Attributes and Controls | Pinegrow Web Editor](https://pinegrow.com/docs/wordpress/creating-custom-wordpress-blocks/adding-attributes-and-controls/)

You could try to create a select control which either changes the Heading type (h1, h2, h3) or you could create the three heading types and control which of these will display.

---

<div class="post-metadata">

**Author:** ![pixaful](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/pixaful/32/6721_2.png) [@pixaful](https://forum.pinegrow.com/u/pixaful)\
**Post date:** [July 7, 2025, 9:10am UTC](https://forum.pinegrow.com/t/dymanic-headings-in-for-gutenberg-blocks-possible/10915/4 "2025-07-07T09:10:38Z")

</div>

Thank you so much, will give that a go now!

---

<div class="post-metadata">

**Author:** ![pixaful](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/pixaful/32/6721_2.png) [@pixaful](https://forum.pinegrow.com/u/pixaful)\
**Post date:** [July 7, 2025, 1:59pm UTC](https://forum.pinegrow.com/t/dymanic-headings-in-for-gutenberg-blocks-possible/10915/5 "2025-07-07T13:59:58Z")

</div>

Hi Guys this is an update, with a video for more clarity as I couldn’t get it work. I managed to get something together than does what I want it to do, but the UX isnt amazing. Really I just want an input box to add the title with a dropdown selector to choose the heading level.

Check it out here

> **[C:\\Users\\hayde\\OneDrive\\Desktop\\pgtwstart\\blocks.html - Pinegrow Web Editor -...](https://app.screencast.com/tnWbLDr44llz1)**
>
> World's leading screen capture + recorder from Snagit + Screencast by Techsmith. Capture, edit and share professional-quality content seamlessly.

---

<div class="post-metadata">

**Author:** ![MONO](https://avatars.discourse-cdn.com/v4/letter/m/9d8465/32.png) [@MONO](https://forum.pinegrow.com/u/MONO)\
**Post date:** [July 16, 2025, 7:45am UTC](https://forum.pinegrow.com/t/dymanic-headings-in-for-gutenberg-blocks-possible/10915/6 "2025-07-16T07:45:47Z")

</div>

For the content wrapper or block wrapper, set two block attributes, for example:

- data\_title / Title: “Heading” / Use as Attribute, Element attribute “data-title” (Here you will set the content of the block heading)
- heading\_type / Title: “Set heading type” / Use as: classes / Control type: Select: class1, class2, class3 (Here you will set the type of displayed heading)

For h1, h2, h3, use:

- Block condition based on “heading\_type”

- Block Attributes - Start → Control type None (expression from data\_title) I hope the mechanism is understandable 😉 You can develop your own, this is just an example, that’s probably how I would solve it. The disadvantage is that you can edit the content only in the sidebar and not directly on the element. The advantage is that it gives you great configuration possibilities.  
If something is unclear, let me know and I’ll quickly make a working block! If you need anything, send me a PM 😉
