Archived topic
Page Header Template Tag Inside a ShortCode
1 reply · Started by Dev on March 23, 2018
I have written a custom shortcode which outputs the following HTML. When expanding the shortcode, GP is not expanding the template tags inside the HTML. So the rendered text does not include the full post title (or any other template tags).
Is this by design or is there is a work around it?
<header class="entry-header custom-entry-header">
</header>
Template tags won't work inside shortcodes. The Page Header searches the content before shortcodes are rendered.
Instead, your shortcode can use the_title() function using PHP.