Support » Plugins and Hacks » [Resolved] Force template to show post author’s nickname
6 years, 10 months ago
I’d like my template to always retrieve the authors nickname, and never their username, regardless of what is set in the users profile.
I did give the following a try, but I couldn’t make it work:
$curauth = get_userdatabylogin($author_name);
$curauth = get_userdata(intval($author));
Post by: <?php echo $curauth->nickname;?>
Can anyone make a suggestion, or post some tips?
The Author_Templates article has an example:
<p>This is <?php echo $curauth->nickname; ?>'s page</p>
Thanks for taking the time to reply, but that’s just what I posted that isn’t working 🙁
Sorry…missed that…what about:
<?php the_author_meta( 'nickname', $userID ); ?>
Wicked! Thank you! 🙂