Archived topic
Page Header Excerpts
10 replies · Started by Tiago on February 10, 2018
Hi there,
Is it possible to add the page/post excerpt into the page header add-on like {{post_excerpt}} (didn't work for me)
Thanks!
Since it's a metabox, you should be able to do this:
{{custom_field.excerpt}}
Let me know :)
Tom,
cant get this to work.
David
That didn't work for me either. Is there some other way to get the page/post excerpt into the page header?
Just looked into this further. Unfortunately it doesn't look like WP stores the excerpt metabox as a custom field.
For now, you'd have to use the custom fields metabox.
In a future version I'll include an "excerpt" template tag.
Ok thanks. Really enjoying the theme!
Great to hear! :)
Hi Tom,
wich future version you mean?
Hi there,
this topic is really old - its not even related to the Header Element... but it never made the cut on any of the updates to it. This doc explains how to add one:
https://docs.generatepress.com/article/page-hero-examples/#example-4
Or better still use the Block Element - Page Hero:
https://docs.generatepress.com/article/block-element-page-hero/
It comes with a GP Dynamic Content Block that can display the Excerpt ( amongst other stuff )
Hi David,
i just have to say...wow! Great.
Does it work with custom post type as well and costum post type terms?
Because i have a custom post type called "Tours" with "Custom Fields "Duration" and "Price"
->Block Element – Page Hero: Awesome!
Alex
It should :)
Please open a new topic if you run into any issues.
Thanks!
