Archived topic
merged header issues
5 replies · Started by Axel on April 12, 2018
hi there,
one more issue facing:
setting page header (merged header) for blog etc. - inserting elementor shortcode for displaying the header which works excellent but now running into some troubles i cant resolve...
- single blog post is missing the featured image no matter what
- monthly archives dont show any header at all, even though is set for all options in global areas
category archives shows the header as expected.
if no page header is set the single blog posts are showing the featured image.
so two questions:
1. how to show the featured image of single blog post even if page header is set?
2. how to get the page header shown on monthly (yearly) archives?
any help appreciated.
Hi there,
1. Try this: https://generatepress.com/forums/topic/feature-image-when-using-page-header/#post-382133
2. We have a new filter in GPP 1.6:
https://docs.generatepress.com/article/generate_page_header_id/
https://codex.wordpress.org/Conditional_Tags#A_Date_Page
Let me know if this helps :)
hi leo,
thanks that helped a lot and works (nearly) like a charm :)
1. works, the featured image shows up.
but: the featured image is always above the post title on single page - no matter what setting choosen within customizer. any way to get the featured image below post title?
2. is solved, great.
1. I think we just need to use a different hook:
add_action( 'generate_after_entry_title', 'tu_add_featured_image' );
function tu_add_featured_image() {
if ( is_singular( 'post' ) && has_post_thumbnail() ) {
the_post_thumbnail();
}
}
that did the trick :)
definitely should dive more into hooks options!
big thanks leo.
No problem :)