Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function contributors() {
- global $wpdb;
- $authors = $wpdb->get_results("SELECT ID, user_nicename from $wpdb->users WHERE display_name <> 'admin' ORDER BY display_name");
- $authors_per_page = 10;
- $page = isset( $_GET['cpage'] ) ? abs( (int) $_GET['cpage'] ) : 1;
- echo paginate_links( array(
- 'base' => add_query_arg( 'cpage', '%#%' ),
- 'format' => '',
- 'prev_text' => __('«'),
- 'next_text' => __('»'),
- 'total' => ceil($total / $authors_per_page),
- 'current' => $page
- ));
- foreach ($authors as $author ) {
- echo "<li>";
- echo "<a href=\"".get_bloginfo('url')."/author/";
- the_author_meta('user_nicename', $author->ID);
- echo "/\">";
- echo get_avatar($author->ID);
- echo "</a>";
- echo '<div>';
- echo "<a href=\"".get_bloginfo('url')."/author/";
- the_author_meta('user_nicename', $author->ID);
- echo "/\">";
- the_author_meta('display_name', $author->ID);
- echo "</a>";
- echo "<br />";
- echo "SitoWeb: <a href=\"";
- the_author_meta('user_url', $author->ID);
- echo "/\" target='_blank'>";
- the_author_meta('user_url', $author->ID);
- echo "</a>";
- echo "<br />";
- echo "Twitter: <a href=\"http://twitter.com/";
- the_author_meta('twitter', $author->ID);
- echo "\" target='_blank'>";
- the_author_meta('twitter', $author->ID);
- echo "</a>";
- echo "<br />";
- echo "<a href=\"".get_bloginfo('url')."/author/";
- the_author_meta('user_nicename', $author->ID);
- echo "/\">Visita il Profilo di ";
- the_author_meta('display_name', $author->ID);
- echo "</a>";
- echo "</div>";
- echo "</li>";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement