Support » How-To and Troubleshooting » Error in template-functions-author.php?

Error in template-functions-author.php?

  • Hello all,

    I thought I would add a list of authors to my sidebar (I’m using a Kubrick based template). However, adding the line

    <?php wp_list_authors(); ?>

    or simply
    <?php list_authors(); ?>

    yeilds the following error message:

    Warning: Invalid argument supplied for foreach() in /data/customers/home/thelip/WWW/wp-includes/template-functions-author.php on line 162

    This occurs regardless of whether I add wp_list_authors(); or list_authors();

    (/data/customers/home/thelip/WWW/ obviously being where my WordPress Blog is installed).

    For the record, Line 162 in the above mentioned file says:

    foreach($authors as $author) {
    $posts = get_usernumposts($author->ID);
    $name = $author->user_nickname;

    At present, I do only have one author (the default admin user). I have NOT created an author.php page. Is this required in order for the list_author(); functions to work? I found the codex a little confusing at this point.


  • The topic ‘Error in template-functions-author.php?’ is closed to new replies.