instructa
Member
Posted 7 months ago #
I'm making an authors.php and I want to add the authors avatar in the authors info I've created. I can call their name, bio info, post count, everything except their avatar. I,ve tried everything I can find like `<?php
echo get_avatar( $id_or_email, $size = '96', $default = '<path_to_url>' );
?>` But nothing seems to work. See my author page here author/alicecan
Looking at the html you have output would suggest the $id_or_email has not been populated, or show avatars is set to no in your admin/settings/discussion.
Otherwise the code
<?php echo get_avatar( get_the_author_meta('ID'), 64 ); ?>
should work fine.
Regards
instructa
Member
Posted 6 months ago #
No that does not work
<?php echo get_avatar( get_the_author_meta('ID'), 64 ); ?>
That shows the mystery man, which is not even my default avatar.
By the by, Avatar Display, Show Avatars, radio box is checked, so set to true.
Thanks for the try but, any other ideas?
Can you post the code you're actually using?
instructa
Member
Posted 6 months ago #
Solved with this
<?php echo get_avatar( $curauth->user_email, $size = '64', $default = '<path_to_url>' ); ?>
Thank You Adam