Updating show_authors() to eliminate Subscribers
-
I have been working on show_authors() codebase and found that I can not remove the Subscribers from the output of this loop. Any suggestions on how to only post Roles aside from Subscriber?
<?php // display all users with a link to their user page function show_authors() { global $wpdb; $users = $wpdb->get_col("SELECT * FROM $wpdb->users ORDER BY user_nicename"); foreach($users as $user) { $user = get_userdata($user); echo '<li><img src="/wp-content/authors/' . $user->user_login . '-5.jpg" alt="" /><span class="author-name">' . $user->display_name . '</span><br /><span class="author-company">' . TruncateString($user->user_url, 26) . '</span><br/<a href="/index.php?author=' . $user->ID . '">View Profile »</a></li>'; } } ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Updating show_authors() to eliminate Subscribers’ is closed to new replies.