Archived topic
Dynamic Subtitle for Header Element
5 replies · Started by Melvin on August 29, 2022
Hi,
I managed to create a header element for all the inner pages with a featured image and an H1 tag. How do I create a dynamic subtitle under the H1 tag so that it shows a different subtitle based on the page selected?
For eg: If it's the "About Us" page, the H1 tag will show "About Us" with the subtitle "Serving the community since 2000"; and if it's the "Services" page, the H1 tag will show "Services" with the subtitle "We provide customised printing services" or something like that.
Hi Melvin,
You’ll need to add a custom Post Meta field for the subtitle of your pages.
A popularly used custom field plugin is ACF. See: https://www.advancedcustomfields.com/resources/getting-started-with-acf/
Then, with a GenerateBlocks Headline Block, you can retrieve this post meta field through the dynamic settings: https://docs.generateblocks.com/article/headline-overview/#dynamic-data
Hi, Fernando,
How do I add the ACF field and the Headline Block into the header Element (Appearance » Elements)? I don't see any option to add them.
Can you provide a link to your site? I’ll check your design and see how to go from there.
Hi, Fernando,
I managed to figure it out. Thank you so much for the prompt response. I appreciate you guys!
Best regards,
Melvin Neo
I see. You’re welcome Melvin!