Skip to:
Content
Pages
Categories
Search
Top
Bottom

Show member with specific Profile Field

  • Avatar of Marc P Gangmei
    Marc P Gangmei
    Participant

    @weblogian

    Pls help me on this

    <?php if ( bp_has_members()) : ?>
    	<?php while ( bp_members() ) : bp_the_member(); ?>
        <?php if ( xprofile_get_field_data('Teacher', $user->user_id ) ) : ?>
    
        
    	<div class="item-avatar">
    				<a href="<?php bp_member_permalink(); ?>">
    				<?php echo bp_member_avatar(); ?></a>
    			</div>
                
    <?php endif; ?>
      	<?php endwhile; ?>
    <?php else: ?>
    
    	<div id="message" class="info">
    		<p><?php _e( "Be the first to join!.", 'buddypress' ); ?></p>
    	</div>
    
    <?php endif; ?>

You must be logged in to reply to this topic.