• Resolved ZoiX

    (@zoix)


    Hi there,

    In a theme I’m building I need to list some authors (not all), but in de codex I’m reading that I can only exclude the admin. In the theme, the profile of each author is “Author”, so, if I list the authors of “Authors” profile (I don’t know how do that), I will get the same issue.

    I was imagining something like wp_list_authors('exclude=4,5,7"); but it’s not possible, as you know, and I guess there is some way to do that.

    I readed about a plugin called List Authors Plus WordPress Plugin that allow us to exclude some authors using their ID, but now it doesn’t exist in the plugins database.

    By the way, I need to list them and add a link to http://www.thesite.com/author/username to :/

    Thank you all.

Viewing 1 replies (of 1 total)
  • Thread Starter ZoiX

    (@zoix)

    Newbie question, I’m sorry, I was seeking throught user info and I get this:

    <?php $users_i_need = get_users('role=author&exclude=1, 2,3,4,46');
        foreach ($users_i_need as $user) {
        echo '<li>' . $user->display_name . '</li>';
    } ?>

    With get_users I can get URL too:

    <?php $users_i_need = get_users('role=author&exclude=1,2,3,4,46');
         foreach ($users_i_need as $user) { ?>
              <ul>
                   <li><a>/author/<?php echo $user->user_login ?>"</a><?php echo $user->display_name ?></li>
              </ul>
         <?php }
    ?>
Viewing 1 replies (of 1 total)
  • The topic ‘List some authors’ is closed to new replies.