Site logo

Archived topic

wont show my gravatar image

8 replies · Started by Matthias on January 30, 2019

Viewing posts 1–9 of 9

Hi there,

can you try disabling your lazy loader plugin?

Hi, I have disabled lazy loading

Hi there,

Are you sure the email address you're using is connected in your Gravatar account?

Yes :)

It worked when I used a 3rd party plugin. But now I use this code in elements:

<div class="author-box">
	<?php 
	
	global $post;
	
	$author_id = $post->post_author;
	
	?>
	
	<div class="avatar"><?php echo get_avatar( get_the_author_meta( $author_id )); ?></div>
 
        <h5 class="author-title"><?php printf( esc_attr__( 'About %s', 'the author' ), get_the_author_meta( 'display_name') );?></h5>
	
				<div class="author-summary">
	
        <p class="author-description"><?php echo wp_kses( get_the_author_meta( 'description' ), null ); ?></p>
 
        <div class="author-links">
 
            <a>" title="Read more">
                ...
            </a>
 
        </div>
 
    </div>
 
</div>

Since then the gravatar wont show

Try this instead:

<div class="author-box">
	<?php 
	global $post;
	$author_id = $post->post_author;
	?>
	
	<div class="avatar">
		<?php echo get_avatar( $author_id ); ?>
	</div>
	
	<h5 class="author-title"><?php printf( esc_attr__( 'About %s', 'the author' ), get_the_author_meta( 'display_name') );?></h5>
	<div class="author-summary">
		<p class="author-description"><?php echo wp_kses( get_the_author_meta( 'description' ), null ); ?></p>

		<div class="author-links">
			...
		</div>
	</div>
</div>

thx that did the trick!

You're welcome :)

This archived topic is closed to new replies.