Archived topic
Bug in GP 3.0.2
13 replies · Started by Sanu Kumar on October 18, 2020
The date shows after the content from the day since I updated GP 3.0
Screenshot: https://ibb.co/RQBXQ3t
Sometimes it shows "Last Updated date" sometimes it shows the only date like - "October 2020"
Hi there,
Are you using any custom functions for the post meta? If so, can you share them here?
Thanks!
add_filter( 'generate_post_author_output', function() {
return sprintf( ' <span class="byline">%1$s</span>',
sprintf( '<span class="author vcard" itemtype="http://schema.org/Person" itemscope="itemscope" itemprop="author">%4$s<a href="%1$s" title="%2$s" rel="author"><span class="author-name" itemprop="name">%3$s</span></a></span>',
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
esc_attr( sprintf( __( 'View all posts by %s', 'generatepress' ), get_the_author() ) ),
esc_html( get_the_author() ),
get_avatar( get_the_author_meta( 'ID' ) )
)
);
} );
add_filter( 'generate_header_entry_meta_items', function() {
return array(
'author',
'comments-link',
'date',
);
} );
add_filter( 'generate_footer_entry_meta_items', function( $items ) {
return array(
'date',
'categories',
);
} );
Hi there,
i checked several posts and all of them displayed the Avatar followed by Last Update date.
Maybe browser caches need clearing ?
I cleared the cache but still showing, does it look all good from your end?
I checked several posts, and refreshed them and they all display like this:

Have you checked after the content? Here: https://ibb.co/q1cjf9t
I saw sometime like this:https://ibb.co/8bcfQbQ
and sometimes like you mentioned above.
The date is in your footer meta because you've added it here:
add_filter( 'generate_footer_entry_meta_items', function( $items ) {
return array(
'date', // This will add the date.
'categories',
);
} );
If you want to remove it, do this instead:
add_filter( 'generate_footer_entry_meta_items', function( $items ) {
return array(
'categories',
);
} );
Thanks, Tom! It works but one thing I still have to do is - sometimes it shows me this: https://ibb.co/8bcfQbQ
and sometimes it shows me a date like this: "Last Updated On....". I want to stick glue with this only.
How to fix this?
You have this CSS added which is adding that text: https://www.screencast.com/t/yOasH7hjOdtJ
Do you want to remove the text, or always have it say last updated on?
always have it say last updated on
Try changing it to this:
.posted-on .updated:before,
.posted-on .entry-date:before {
content: " Last Updated On ";
}
thanks Tom
You're welcome :)