The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Error in template-functions-author.php? (1 post)

  1. rdhs100
    Posted 10 years ago #

    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.


Topic Closed

This topic has been closed to new replies.

About this Topic