Can anyone shed some light? All I want to do is display the_author_description inside comments loop.
Thanks guys.
]]>I would like to set up a page on my blog that has descriptive bios for each author. I’d like it to call the <?php the_author_description(); ?> for each person, like so:
Author 1: <?php the_author_description(); *for author 1* ?>
Author 2: <?php the_author_description(); *for author 2* ?>
Author 3: <?php the_author_description(); *for author 3* ?>
How can I write the php so that I can specify which the_author_description I want based on author ID? Unfortunately *for author 1* doesn’t work ;).
I already have the “running php in a page” problem sorted out. I’m successfully using runPHP to call my own bio (<?php the_author_description(); ?> works great automatically for the actual author of the page).
Here’s the author page in question: https://purplepapaya.net/etsy/editors/
PS: I looked at https://codex.www.ads-software.com/Author_Templates, but I’m just not smart enough to go from there to where I need to be.
]]>I’ve got this far:
<?php $userdata = get_userdata(1); ?>
<?php if ($userdata->description != '') { ?>
<h2>About the Author</h2>
<p><?php _e($userdata->description); ?></p>
<?php } ?>
But can’t find a way to get the author_id within the loop in order to pass it to the get_userdata function.
]]>Has anyone else encountered this and/or how would you suggest going about formatting certain areas of the description?
]]>I’ve tried using the the_author_description() function as well as
<?php
if(isset($_GET[‘author_name’])) :
$curauth = get_userdatabylogin($author_name);
else :
$curauth = get_userdata(intval($author));
endif;
echo $curauth->user_description;
?>
nither are working in 2.0
]]>