Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Google Map Integration

jvinch – this is the code I use for the Featured Members on the homepage:

<div class="widget">
<h2 class="widgettitle"><?php _e( 'Featured Members', 'buddypress' ) ?></h2>

<?php $users = BP_Core_User::get_random_users( 2, 1 ) ?>

<?php if ( $users['users'] ) { ?>
<ul id="featured-member-list" class="item-list">
<?php foreach( $users['users'] as $user ) : ?>
<li>
<div class="item-title"><strong><?php echo bp_core_get_userlink( $user->user_id ) ?></strong></div>
<div class="item-avatar">
<a href="<?php echo bp_core_get_userlink( $user->user_id, false, true ) ?>"><?php echo bp_core_get_avatar( $user->user_id, 1 ) ?></a>
</div>

<div class="item">
<!-- div class="item-meta"><span class="activity"><?php echo bp_core_get_last_activity( get_usermeta( $user->user_id, 'last_activity' ), __('active %s ago') ) ?></span></div -->

<?php if ( function_exists( 'xprofile_get_random_profile_data' ) ) { ?>
<!-- ?php $random_data = xprofile_get_random_profile_data( $user->user_id, true ); ? -->
<div class="item-title profile-data">
<strong>About Me: </strong><?php echo BP_XProfile_ProfileData::get_value_byid( 2, $user->user_id ); ?>
</div>
<div class="item-title profile-data">
<strong>RV Type: </strong><?php echo preg_replace('/^.*?"(.*?)".*$/', '$1', BP_XProfile_ProfileData::get_value_byid( 3, $user->user_id ) ); ?>
</div>
<?php } ?>
</div>
</li>
<?php endforeach; ?>
</ul>
<?php } else { ?>
<div id="message" class="info">
<p><?php _e( 'There are no members to feature.', 'buddypress' ) ?></p>
</div>
<?php } ?>
</div>

Skip to toolbar