WordPress.org

Ready to get started?Download WordPress

Forums

Template tag wp_list_authors not parsed! (7 posts)

  1. baudesign
    Member
    Posted 7 years ago #

    Hi everyone,

    I am working on implementing the Fauna theme on my weblog, and there is a bug I do not understand at all.

    There is a template file (template-authormeta.php, FYI) that makes use of the wordpress template tag wp_list_authors, which contains this code:


    <?php /* Fix an annoying WP bug where wp_list_authors borks when there's only one user */
    $numauthors = $wpdb->get_var("SELECT count(*) FROM $wpdb->users");
    if ($numauthors > 1) { ?>
    <?php printf(__('There are %s authors/users attached to this weblog:','fauna'), $num_authors) ?>
    <ul>
    <?php wp_list_authors('optioncount=1&feed=RSS'); ?>
    </ul>
    <?php } else { ?>
    <?php _e('There is one author attached to this weblog.','fauna'); ?>
    <?php } ?>

    Now, if you look at my sidebar, on my testing blog, you notice that this template tag is not pared at all, nothing happens!?

    http://baudesign.ca/ksl/?author=1

    What is wrong here? Any idea?

    Thanks

    Patrick

  2. baudesign
    Member
    Posted 7 years ago #

    After a bit of discussion, it seems that the problem is on the WordPress side. Can anybody confirm?

  3. baudesign
    Member
    Posted 7 years ago #

    Is there anyone at WordPress development that can answer this question?

  4. uberdose
    Member
    Posted 7 years ago #

    Just tried it without any problems.

    I suppose this means "There are %s authors/users attached to this weblog":
    Ce blogue compte 3 participants, toutes catégories confondues

    If yes, the if-branch is reached, there must be some other problem.

    It could help to take
    <?php wp_list_authors('optioncount=1&feed=RSS'); ?>
    and paste it into the index.php of your theme so you can see whether it works or not.

  5. baudesign
    Member
    Posted 7 years ago #

    Indeed uberdose, the if branch is reached, up to the ":". Then, we should see the "List of authors", but we don't.

    I put the code in my index.php file like you suggested, and it still does not work.

  6. baudesign
    Member
    Posted 7 years ago #

    Il est navrant de constater que personne ne puisse -- ou ne veuille -- répondre à cette question. C'est pourtant un bogue qui pourrait intéresser toute la communauté WordPress.

  7. baudesign
    Member
    Posted 7 years ago #

    Pff! This sucks, I just upraded to the latest release and the bug is still there.

Topic Closed

This topic has been closed to new replies.

About this Topic