Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
  • in reply to: Display extra fields Group Member card #61630
     Abracadabra
    Participant

    Hello Laura, I’m actually interested in doing this as well.

    I already have custom code in my functions.php that adds extra information to my all members page profiles and I would like to have that visible on group members page as well.

    I have this code:

    COPY CODE
    add_action('bp_directory_members_item', 'bphelp_dpioml');
    function bphelp_dpioml(){
    
    $bphelp_my_profile_field_1='Location';
    $bphelp_my_profile_field_2='Company';
    $bphelp_my_profile_field_3='Position';
      
    
    if( is_user_logged_in() && bp_is_members_component() ) { ?>        <div class="bph_xprofile_fields" style=" margin-left:0 !important; text-align:center !important;"> <br />       
    
    <?php echo bp_member_profile_data( 'field='.$bphelp_my_profile_field_1 );  ?><br />        
    
    <?php echo bp_member_profile_data( 'field='.$bphelp_my_profile_field_2 ); ?><br />         
    
    <?php echo bp_member_profile_data( 'field='.$bphelp_my_profile_field_3 ); ?><br><br />         
    
    </div><?php       }}

    What I noticed is that the information you had given was for bp directory members item as well, so would that work for group members page?

    Im guessing there is a way just to copy the same code but replace the

    COPY CODE
    add_action('bp_directory_members_item', 'bphelp_dpioml');
    function bphelp_dpioml(){

    with something else for it to work with group members?

Viewing 1 post (of 1 total)

Log in with your credentials

Forgot your details?