This topic has 1 reply, 2 voices, and was last updated 9 years by sharmstr.

  • Author
  • #54299
     kheopsarohn
    Participant

    Hi,

    I would like to display extra field on the members page. The plugins BuddyPress Xprofile Custom Fields Type and Gravity Forms have been installed.

    If i understood well, i have to put some codes after :

    <?php
    /***
    * If you want to show specific profile fields here you can,
    * but it’ll add an extra query for each member in the loop
    * (only one regardless of the number of fields you show):
    *
    * bp_member_profile_data( ‘field=the field name’ );
    */

    ?>

    It’s what i’ve done. I’ve tried three different ways :

    First way :

    <?php if ( bp_get_member_profile_data( ‘field=ttt’) ) : ?> /* ttt is an example of field.*/

    <?php bp_member_profile_data( ‘field=ttt’ ); ?>
    <?php endif; ?>

    Second way :

    <?php $user_ID = bp_get_member_user_id(); ?>
    <?php if ( xprofile_get_field_data( ‘ttt’, $user_ID ) ) : ?>
    <?php echo ‘<br /><span class=”item-meta”>test:</span> ‘; ?>
    <?php echo xprofile_get_field_data( ’ttt’, $user_ID ); ?>
    <?php endif; ?>

    Third way :

    <?php bp_member_profile_data( ‘field=ttt’) ?>
    Neither of them work.

    Have you an idea of how can i do ? Thanks for your help and reply. Cheers

    #54300
     sharmstr
    Moderator

    Those work. The times that people have had issues displaying the fields all ended up being plugin conflicts. Do a search here. Its been discussed and sample code has been provided.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

Viewing 2 posts - 1 through 2 (of 2 total)

The forum ‘General questions’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?