Archived topic
Dynamic Content to Display Page Title
3 replies · Started by Ian on November 14, 2020
I noticed we can now use a featured background inside a Container's background image. I have created a Blocks Element and would like to display the Page Title inside this same container. I understand this function is not possible at this time using Block Elements. I also understand it may be possible using a custom shortcode.
Based on this KB: https://docs.generatepress.com/article/creating-a-shortcode/
What is the proper syntax to display the Page Title:
echo 'short code example';
This Blocks Element is to be displayed at the top of every page as a Page Hero. I think I am almost there. Any help with the proper syntax for the echo '' line would be appreciated!
Thanks!
Ian
Hi there,
What about this?
https://generatepress.com/forums/topic/add-page-title-in-page-header/#post-245321
Thanks Leo! This works well! Can't wait until Block Elements support Template tags.
Appreciate it!
No problem :)