Members Directory show more info from Profile

How can I have the plugin pull and show more info from the profile page? I was thinking about changing the fields names: AIM, Yahoo, Grabber into Phone, Fax, Mobile, then have Members Directory to show it between NAME and WEBSITE.

Any suggestions?

Cheers,
Ronald

  • 3SixtyEvolve

    Hi Ronald

    Thanks for being a member of our Community!

    This plugin is a fairly simple one aimed at just providing a list. It simply pulls out the members and displays the names, keeping the overhead to a minimum. You would therefore have to modify the plugin to achieve that.

    I was looking at alternatives if you're looking for a members' list with more flexibility to add custom profile fields and the only other option that came to me is using BuddyPress and simply hiding the items from BuddyPress that is not relevant to your requirements.

    I did find a very nifty plugin called 'Cimy User Extra Fields' that is useful for adding additional fields to the standard WP Profile page, but that's not really what you're looking for (just thought it's useful to keep bookmarked for future use).

    Sorry I can't be of more assistance here. Hope you find a solution that works for you.

    All the best.

    Gina

  • Dutchman

    Hi Gina,

    Thanks for the reply! I have used buddypress before in my other projects. But the thing is I already have a good running setup. Buddypress would only be extra load and will overwrite certain settings like login form.

    I looked at some other posts here and saw some suggestions etc, so I looked at teh code and saw this:

    if ( !empty( $user_name ) && $user_name != ' ' ) {
    							$content .= '<strong>' . __('Name') . '</strong>: ' . $user_name . '<br />';
    						}
    						if ( !empty($user_website) ) {
    							$content .= '<strong>' . __('Website') . '</strong>: ' . '<a href="' . $user_website . '">' . $user_website . '</a><br />';
    						}
    						if ( !empty($user_bio) ) {
    							$content .= '<strong>' . __('Bio') . '</strong>: ' . $user_bio . '<br />';
    						}
    						if ( !empty($user_bio) ) {
    							$content .= '<strong>' . __('Bio') . '</strong>: ' . $user_bio . '<br />';
    						}
    						if ( empty($user_name) && empty($user_website) && empty($user_bio) ) {
    							$content .= __('This user has not entered any information.');
    						}

    Maybe somebody can tell me which code I can add to call up the fields?
    I just want to show more whats already in the profile page.

  • S H Mohanjith

    You need to make all the changes in members_directory_output function in members-directory.php (You were in the right track).

    Add the following after $user_bio = get_user_meta( $user_details->ID, "description", true ); where ever it appears.

    $user_aim = get_user_meta( $user_details->ID, "aim", true );
    $user_yahoo = get_user_meta( $user_details->ID, "yim", true );
    $user_jabber = get_user_meta( $user_details->ID, "jabber", true );

    Following after Bio

    if ( !empty( $user_aim ) ) {
    $content .= '<strong>' . __('AIM') . '</strong>: ' . $user_aim . '<br />';
    }
    if ( !empty($user_yahoo) ) {
    $content .= '<strong>' . __('Yahoo') . '</strong>: ' . $user_yahoo . '<br />';
    }
    if ( !empty($user_jabber) ) {
    $content .= '<strong>' . __('Jabber') . '</strong>: ' . $user_jabber . '<br />';
    }

    Hope it helps :slight_smile:

  • Dutchman

    That works like a charm!!! Thanks for the feedback!
    What about using extra fields when using this for example:

    // CUSTOM USER PROFILE FIELDS
       function my_custom_userfields( $contactmethods ) {
    
        // ADD CONTACT CUSTOM FIELDS
        $contactmethods['contact_phone_office']     = 'Office Phone';
        $contactmethods['contact_phone_mobile']     = 'Mobile Phone';
        $contactmethods['contact_office_fax']       = 'Office Fax';
    
        // ADD ADDRESS CUSTOM FIELDS
        $contactmethods['address_line_1']       = 'Address Line 1';
        $contactmethods['address_line_2']       = 'Address Line 2 (optional)';
        $contactmethods['address_city']         = 'City';
        $contactmethods['address_state']        = 'State';
        $contactmethods['address_zipcode']      = 'Zipcode';
        return $contactmethods;
       }
       add_filter('user_contactmethods','my_custom_userfields',10,1);

    `

    Or just renaming the yabber, google,AIM to phone, mobile and fax?

  • scot

    This is great input, thanks so much for posting this. i appreciate it. It has really made that profile page better. Can i ask something here or do i need to re-post my questions. it is on the profile page so here it goes.

    On the profile page. When a member has posts they display under the bio area.. can I pull the featured image / thumbnail if the article has one? i can't find that info anywhere. Thanks.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.