Site logo

Archived topic

Meta Info for page header

10 replies · Started by John on February 14, 2018

Viewing posts 1–11 of 11

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

Hi 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]

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

It's just showing as [avatar] within the page header when you update it?

I updated page header and post also. But doesn't show.

Nothing shows, or you see the [avatar] text on the live page?

Nope

Which one? They're both super different issues, so it's important to know which issue to try to figure out.

Nothing shows in live page. Even [avatar] text also do not show

Only shows Lst Update Date and Author name

So 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.

This archived topic is closed to new replies.