Support » Fixing WordPress » Author pages with names, bios
5 years, 11 months ago
I’m using this code in my theme’s author.php file:
$curauth = get_userdatabylogin($author_name);
<h2><u>Posts by <?php echo $curauth->first_name . ' ' . $curauth->last_name; ?></u></h2>
echo '<table border=0>';
echo '<tr><td align=center>'; the_author_image($ID);
echo '</td><td valign="top">' . $curauth->description . '</td></tr>';
Usually this works great to display the author’s name at the top of his or her index page along with the author bio. Here’s an example:
However, this code doesn’t seem to work for a new blogger, whose name and bio don’t appear on this page:
I’ve tried copying and pasting similar snippets from this page, but none of them work for Mike:
Any suggestions of why Mike is an exception, and what might work for him?
5 years, 10 months ago
Editing the users table to make the author’s name a single word with no spaces or punctuation resolved the issue.