go41

Re: How to display grid of authors :: Reply by Joern

von Joern am 13. Jul. 2010 | Keine Kommentare

no idea how to exclude the admin in top query, you could do something like this inside the loop, it will jump the author with id=1:
Code:

if ( '1' == $author->ID ) { continue;}
no idea again if following code will show the image and exclude author ID 1, just try
<?php
$lastnames = $wpdb->get_col("SELECT user_id FROM $wpdb->usermeta WHERE $wpdb->usermeta.meta_key = 'last_name' ORDER BY $wpdb->usermeta.meta_value ASC");
  foreach ($lastnames as $userid) {
if ( '1' == $user->ID ) { continue;}
    $user = get_userdata($userid);
    $post_count = get_usernumposts($user->ID);
    $author_posts_url = get_author_posts_url($user->ID);
    $auth_img = userphoto($user->ID);
    echo '<li>' . $auth_img . '<br /><a href="' . $author_posts_url . '">' . $user->user_firstname . ' ' . $user->user_lastname . '</a> (' . $post_count . ') </li>';
  }
?>

____________________
you find me on Google+, Twitter and Facebook

(von: Joern)

Hier noch 3 weitere Ergebnisse dieses Threads:

How to display grid of authors

13. Jul. 2010 (von: adamwork)

I understand that you can use <?php list_authors(TRUE, TRUE, TRUE); ?> to display the list of all the authors on the site. But how would you go about setting up a grid with a picture of each author, their name,…

Re: How to display grid of authors :: Reply by Joern

13. Jul. 2010 (von: Joern)

list_authors is now wp_list_authors and loops in itself with some arguments you can set.So here you can't include the image of the 'user photo' plugin (userphoto_the_author_photo).You have to create a custom loop, a sample query for users you find here:List…

Re: How to display grid of authors :: Reply by adamwork

13. Jul. 2010 (von: adamwork)

joern thanks for getting back. the top version works well, but displays the admin.the bottom version is good, but only displays the first name over and over again.Therefore, how can I include the exlude admin into the first one?also, where…

Autor:

Du findest mich auch auf Google+, Twitter und Facebook!

Schreibe einen Kommentar

Pflichtfelder sind mit * markiert.


weitere forum Beiträge: