BuddyDev

Search

BuddyPress Custom Xprofile Fields About

  • Participant
    Level: Initiated
    Posts: 12
    Abdullah on #24409

    How can I show the new fields I added with BuddyPress Custom Xprofile Fields plugin in the member list? For example I would like to view the social media accounts of the users in the members list here. How can I do that.

  • Keymaster
    (BuddyDev Team)
    Posts: 24190
    Brajesh Singh on #24416

    Hi Abdullah,
    The plugin provide field types.

    What you are looking for is to add data on member listing. You will need to do that by modifying the member loop.

    You can use the following code

    
    
    echo xprofile_get_field_data("Field Name Or ID", bp_get_member_user_id(), 'comma' );
    
    

    You will need to change the first argument of the function and put it inside your member loop.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 12
    Abdullah on #24427

    Thank you for your attention. I need your help because my coding is poor. Can you tell me exactly which file and line I should add the code you’re talking about?

  • Keymaster
    (BuddyDev Team)
    Posts: 24190
    Brajesh Singh on #24441

    Hi Abdullah ,
    It needs modification in your theme and will depend on which theme/template pack you are using.

    If you are using a custom theme, Please contact the theme developer with above code and they will assist.

    If you are not sing any premium theme, Please let me which template pack you are using and I will assist.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 12
    Abdullah on #24495

    Thank you for your interest. I’m using Boombox theme. I can send you the theme file if you want.

  • Keymaster
    (BuddyDev Team)
    Posts: 24190
    Brajesh Singh on #24505

    Thank you. I have received your message. Will update by tomorrow.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 12
    Abdullah on #24512

    Thank you for your interest. I look forward to your reply.
    Regards

  • Keymaster
    (BuddyDev Team)
    Posts: 24190
    Brajesh Singh on #24528

    Hi,
    Please add this to your function.php

    
    
    add_action( 'bp_directory_members_item', function (){
    
    	bp_member_profile_data( 'field=About' );
    
    });
    

    You can change ‘About’ to any field name.

    Also, you can show multiple field data by adding more lines like

    
    
    add_action( 'bp_directory_members_item', function (){
    
    	bp_member_profile_data( 'field=About' );
            bp_member_profile_data( 'field=Field 2' );
            bp_member_profile_data( 'field=Field 3' );
    
    });
    

    and so on.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 12
    Abdullah on #24529

    İlginize teşekkür ederim. Ama ne yazık ki olmadı. Size özel mesaj gönderdim. Bakarsanız çok sevirim.

  • Participant
    Level: Initiated
    Posts: 12
    Abdullah on #24668

    Thank you for your interest. But unfortunately it didn’t. I sent you a private message. I would love it.

You must be logged in to reply to this topic.

This topic is: not resolved