Archived topic
Post loop by SiteOrigin: header of posts dissapears after update GP to 3
11 replies · Started by Mieke on November 3, 2020
After updating GeneratePress from 2.4.2 to 3, the headers <header class = "entry-header"> disappears in pages with the post loop of Page Builder by SiteOrigin. I have problems with this on several sites.
Is this a known issue? How can I fix this?
I have GP Premium: 1.12.2 with theme: 3.0.2
Hi there,
Any chance you can link us to the site in question?
You can use the private information field.
Let me know :)
Hi Leo,
Thanks for your reply. I made a copy of one of the sites where this problem happens. See private information for site url and your login.
Hi there,
Our post meta isn't set up to display on pages by default.
You could try doing this:
add_filter( 'generate_entry_meta_post_types', function( $types ) {
if ( is_front_page() ) {
$types[] = 'page';
}
return $types;
} );
add_filter( 'generate_footer_meta_post_types', function( $types ) {
if ( is_front_page() ) {
$types[] = 'page';
}
return $types;
} );
Let me know :)
Thanks for the add_filters code. it partly solves my question, now I have in the post loop meta in header (date) and footer (categories), but still no entry-title.
I can't find a filter to show the entry-title in the post loop.
What did change from GP 2.4.2 to 3? The post loop has different problems on several sites.
I just altered the code above to handle titles as well: https://generatepress.com/forums/topic/post-loop-by-siteorigin-header-of-posts-dissapears-after-update-gp-to-3/#post-1518242
A lot changed in 3.0 when it comes to post meta and titles - this will allow us more flexibility for options in the pro version. In this case, a third-party plugin is being used to display our post loop on a static page, which the theme wasn't built to do/isn't aware of. That's why we have these functions to make things more flexible if needed :)
Thanks for the new code. I added the extra code but unfortunately no title has been added in the post loop yet. Any more ideas?
Hmm strange, can you try the updated code?: https://generatepress.com/forums/topic/post-loop-by-siteorigin-header-of-posts-dissapears-after-update-gp-to-3/#post-1518242
Still not working...
I previously sent you login details bij Private information. You're welcome to take a look yourself.
It looks like you've set the template in the widget to content-link.php. What happens if you use content.php?
As it is often the case, the solution was so close that I did not see it. On the homepage I had checked that the entry title should not be shown. As a result, the title was not shown in the post loop either. By unchecking this option, the titles are shown again in the post loop. I addded some css to hide the main entry title. That was all!
(but still, in GP 2.4.2 this worked differently)
Thanks for thinking along. Solved!
Glad you got it working :)