这应该很有效。。。在本例中,我使用的是wordpress codex,因此您可以:
From Wordpress Codex
<?php echo get_avatar( $id_or_email, $size, $default, $alt ); ?>
所以。。。基于此。。。
This is the code you should embed in the desired location in your theme:
<?php
wp_get_current_user();
$size = array(60,60); // this is the size of the avatar
echo get_avatar( $current_user->user_email, $size, $default, $current_user->display_name );
?>
希望这有帮助:)