I've got a custom authors page for a multi-author blog.
Here's the code I'm using to generate the page (thanks to other folks in the support forums for providing it):
<?php $excluded = "1,2,3,7,20,21"; // To exclude external admin author IDs $sql = "SELECT DISTINCT post_author, umeta.meta_value as last_name FROM $wpdb->posts JOIN $wpdb->usermeta umeta ON ($wpdb->posts.post_author = umeta.user_id AND umeta.meta_key = 'last_name') WHERE post_author NOT IN ($excluded) AND post_status = 'publish' AND post_type = 'post' ORDER BY last_name, post_author "; $authors = $wpdb->get_results($sql); if($authors): foreach($authors as $author): ?>
What I can't figure out is how to set a maximum number of authors per page and paginate. I've got WP-PageNavi installed, but I'm not having any luck implementing it here on a custom template page.
Thanks in advance.