Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm making a website for a student activity and have a wordpress page for each member under a common parent group. Each page contains some member info (currently unstructured) and a profile picture.

I would like to list all these members under a member page with perhaps a grid of profile pictures and names. Is there a plugin that can accomplish this?

Note that each member does not have a wordpress account. I already found plugins that can do that, but it's not what I am looking for.

share|improve this question

3 Answers 3

up vote 1 down vote accepted

You might consider create a custom post type 'person' to mirror your user and then you'll be able to create member pages by creating a single-person.php theme template file. This answer provides code for doing that:

share|improve this answer
    
Thanks for the answer. Would the information/picture for the members be contained in the posts of type person or in pages? –  Gus Jan 31 '11 at 7:34
    
@Gus - You wouldn't use a Page for this, only a person custom post type. But since you are asking that question I'm guessing you don't understand the distinction? a "Page" in WordPress is an element of content where the post_type='page' (contrasting with a "Post" where the `post_type='post'. Confusing, I know, but it's the best they could do given legacy naming issues.) So a "Page" in WordPress is not correlated to a "web page", which is simply the HTML output generated by a theme template file. If I've still left you confused, please ask more questions. –  MikeSchinkel Jan 31 '11 at 8:03
    
Thanks for the clarification! I installed the "Custom Post Types" plugin and have created a member custom post type. Is there a way to have a structure behind a post type? For example, members have attributes like name and picture. I figure that single-member.php could display these fields. I'd like to refer to these attributes when listing all the members in a members' page. Additionally, if I start writing it, how portable can I make single-member.php between different themes? –  Gus Jan 31 '11 at 8:23
    
Gus - Creating a structure behind custom post types is a frequent requested need, and one that plugins address but not as well as I like. Check out this resource and thus far Simple Fields is probably the best I've seen. –  MikeSchinkel Jan 31 '11 at 11:16
    
@Gus - Rather than trying to make single-member.php portable across themes, create your own set of Template Tags that people using your plugin can use in their templates (I assume you are now thinking beyond this one website and want to distribute as a plugin too?) In addition, you could add a configurable option that would append your content to the end of the content using the_content hook, but be sure to let themers disable it if they want to. –  MikeSchinkel Jan 31 '11 at 11:18

Have you looked at BuddyPress? It's was built for Wordpress but continued to grow. It has it's own installation and you can make a whole user community (or social network) like facebook. It's at buddypress.org.

Hope that helps, elaine http://www.enzolina.com/web

share|improve this answer

You can use Members List Plugin The Plugin allows you to create a post on your wordpress blog that lists all your wordpress members. http://wordpress.org/extend/plugins/members-list/screenshots/

But i would create a template page for that

    <ul id="membersList">

<?php
/*
    First we set how we'll want to sort the user list.

    You could sort them by:
    ------------------------

    * ID - User ID number.
    * user_login - User Login name.
    * user_nicename - User Nice name ( nice version of login name ).
    * user_email - User Email Address.
    * user_url - User Website URL.
    * user_registered - User Registration date.
*/

$szSort = "user_nicename";

/*
    Now we build the custom query to get the ID of the users.
*/

$listUsersID = $wpdb->get_col( $wpdb->prepare(
    "SELECT $wpdb->users.ID FROM $wpdb->users ORDER BY %s ASC"
    , $szSort ));

/*
    Once we have the IDs we loop through them with a Foreach statement.
*/

foreach ( $listUsersID as $userid ) :

/*
    We use get_userdata() function with each ID.
*/

$user = get_userdata( $userid );

/*
    Here we finally print the details wanted.
    Check the description of the database tables linked above to see
    all the fields you can retrieve.

    To echo a property simply call it with $user->name_of_the_column.

    In this example I print the first and last name.
*/

    echo '<li><div class="member_item">' . ucwords( strtolower( $user->first_name . ' ' . $user->last_name ) ) . '</div></li>';

/*
     The strtolower and ucwords part is to be sure
     the full names will all be capitalized.
*/

endforeach; // end the users loop.
?>

</ul>
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.