If Else Gravatar Author Picture

You need to use get_the_author_meta() instead of the_author_meta()

<?php
$authorpic = get_the_author_meta('author_pic');
if ($authorpic)
    echo $authorpic; 
else
    echo get_avatar( get_the_author_email(), '80' ); 
?>

Leave a Comment

error code: 523