- This topic has 10 replies, 2 voices, and was last updated 4 years, 3 months ago by
Tom.
-
AuthorPosts
-
February 14, 2018 at 11:27 am #496500
John
Hey
I have few problem. In page Header
1. I want to add gravatar image in middle Last Update Date and author name.
Like – Last Update | gravatar image | author image
2. I try to change color but can not for last update date, author name. By default, It’s blue want to change to white but doesn’t find exact class.
3. I want to keep – “ast Update | gravatar image | author image” – in single line.
How can I do this?
Thanks
GeneratePress 2.0.2February 14, 2018 at 10:23 pm #496888Tom
Lead DeveloperLead DeveloperHi there,
Looks like you figured out the link color? It should take the link color set in your Page Header settings.
For the author image, you can build a shortcode:
add_shortcode( 'avatar', 'tu_author_avatar' ); function tu_author_avatar() { ob_start(); global $post; $author_id = $post->post_author; get_avatar( $author_id, 32 ); return ob_get_clean(); }
Then you would use this inside your page header content:
[avatar]
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentFebruary 15, 2018 at 12:46 am #496930John
Hey Tom
I added code snippets in child theme functions.php and [avatar] in page header content section but doesn’t work for me.
Here is both screenshot link
Link – https://prnt.sc/iezqtd
Link – https://prnt.sc/iezqxi
February 15, 2018 at 10:37 am #497484Tom
Lead DeveloperLead DeveloperIt’s just showing as [avatar] within the page header when you update it?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentFebruary 15, 2018 at 11:47 am #497532John
I updated page header and post also. But doesn’t show.
February 15, 2018 at 9:49 pm #497866Tom
Lead DeveloperLead DeveloperNothing shows, or you see the [avatar] text on the live page?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentFebruary 15, 2018 at 10:50 pm #497886John
Nope
February 16, 2018 at 10:39 am #498365Tom
Lead DeveloperLead DeveloperWhich one? They’re both super different issues, so it’s important to know which issue to try to figure out.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentFebruary 16, 2018 at 10:57 am #498386John
Nothing shows in live page. Even [avatar] text also do not show
February 16, 2018 at 11:10 am #498396John
Only shows Lst Update Date and Author name
February 16, 2018 at 8:54 pm #498605Tom
Lead DeveloperLead DeveloperSo that means
get_avatar()
is failing.Does the user have an avatar if you view their profile in the Dashboard? I see that you don’t have one set to the email you’re using in these forums.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-development -
AuthorPosts
- You must be logged in to reply to this topic.