How to display a list of Wordpress authors in a dropdown menu with a link to the author's template?

I'm looking for a way to display the authors of a wordpress blog as a dropdown menu with a change event that redirects the user to an author page listing all the previous posts written by that user.

Is there a way to do this?

+1


a source to share


2 answers


UPDATE Actually, you should just use wp_list_authors () for everything, as it automatically creates a list of authors with a link to the page with all their posts. See http://codex.wordpress.org/Template_Tags/wp_list_authors#Markup_and_Styling_of_Author_Lists for details .

I am using this plugin to display posts by author and it works well. http://www.dagondesign.com/articles/posts-by-author-plugin-for-wordpress/

I have an author.php template that displays information about the author (pic, blurb) and below. I am displaying their 5 most recent posts using the plugin above.



To show a pic, I'm using this plugin: http://wordpress.org/extend/plugins/user-photo/

To get the dropdown content you can use this wp function:

<?php wp_list_authors(); ?>

      

+2


a source


WordPress has now added a function for this:

<?php wp_dropdown_users( $args ); ?>

      



You just need to enter your arguments. If you want a sample of this in an HTML form with a submit button, there is one here http://bit.ly/wWunIE

Hope it helps.

+2


a source







All Articles