WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Author pages with names, bios (2 posts)

  1. kgagne
    Member
    Posted 3 years ago #

    I'm using this code in my theme's author.php file:

    <?php
    $curauth = get_userdatabylogin($author_name);
    ?>
    
    <h2><u>Posts by <?php echo $curauth->first_name . ' ' . $curauth->last_name; ?></u></h2>
    <p>
    <?php
    	echo '<table border=0>';
    	echo '<tr><td align=center>'; the_author_image($ID);
    	echo '</td><td valign="top">' . $curauth->description . '</td></tr>';
    	echo '</table>';
    ?>

    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:

    http://www.challengeblog.org/author/todd/

    However, this code doesn't seem to work for a new blogger, whose name and bio don't appear on this page:

    http://www.challengeblog.org/author/mike-sullivan/

    I've tried copying and pasting similar snippets from this page, but none of them work for Mike:

    http://codex.wordpress.org/Author_Templates

    Any suggestions of why Mike is an exception, and what might work for him?

    -Ken

  2. kgagne
    Member
    Posted 3 years ago #

    Editing the users table to make the author's name a single word with no spaces or punctuation resolved the issue.

Topic Closed

This topic has been closed to new replies.

About this Topic