Archived topic
Add Author Image to Single Post Entry Meta
7 replies · Started by Navaneetha on February 12, 2019
Hai.
I would like to add Author image to single post entry meta. This one https://docs.generatepress.com/article/entry-meta-style/ Not working for me. Can u please help me to add this.
Hi there,
Can you make sure Display Post date is activated?
https://docs.generatepress.com/article/blog-content-layout/
Hey there.
I don't want to make post date visible. I want to visible the Author image & author name only in the entry meta
Thanks
Hi there,
Try this function:
add_filter( 'generate_post_author_output', function( $output ) {
$avatar = get_avatar( get_the_author_meta( 'ID' ) );
if ( $avatar ) {
return $avatar . $output;
}
return $output;
} );
Then this CSS:
.entry-meta .avatar {
width: 25px;
border-radius: 50%;
vertical-align: middle;
margin: 0 5px;
}
Let me know :)
Thank you so much.Its working
You're welcome :)
Hi tom, thanks for your great support.
I wanna show this https://docs.generatepress.com/article/entry-meta-style/ only in single?
I try disable meta author in blog archive by customizer but it didnt work.
Hi Randy,
Can you open a new topic for your concern? So you could use the private information text field to provide the site details. Thank you.