Skip to content

Instantly share code, notes, and snippets.

@bryanmonzon
Last active August 29, 2015 14:11
Show Gist options
  • Save bryanmonzon/a0eb1a413f5b13f96fbe to your computer and use it in GitHub Desktop.
Save bryanmonzon/a0eb1a413f5b13f96fbe to your computer and use it in GitHub Desktop.
<div class="member-wrapper">
<?php
$args = array(
'role' => 'practitioner',
'number' => 10
);
$user_query = new WP_User_Query( $args );
if( !empty( $user_query ) ) :
foreach ( $user_query->results as $user ) : ?>
<a href="<?php echo nam_get_profile_url( $user->ID ); ?>">
<div class="member col-sm-3">
<div class="photo-wrapper post">
<div class="photo">
<?php echo get_avatar( $user->ID ); ?>
</div>
<div class="overlay"><span class="fa fa-eye"></span></div>
<div class="name"><?php echo $user->display_name; ?></div>
</div>
</div>
</a>
<?php
endforeach;
else:
echo '<p>No users found.</p>';
endif; ?>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment