Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 11 replies - 1 through 11 (of 11 total)

  • Lerroy
    Participant

    @lerroy

    Hi Where did you put this in functions file ?


    Lerroy
    Participant

    @lerroy

    Ok I was able to fix this issue.

    I added this code to my members-header.php

    <?php $Name = bp_get_profile_field_data( 'field=Name' ) ;
    echo '<h2 class="Name-fields_main">' .$Name. '</h2>';
    ?>

    added the code on line 22 just under this

    <div id="item-header-content">


    Lerroy
    Participant

    @lerroy

    Ok
    After allot more research I found a solution. looks like I was putting your code in the wrong spot sure it would have worked as well @Barney

    I used this code

    <?php
       
      $state = bp_get_profile_field_data( 'field=State' ) ;
    echo '<p class="profile-fields">State: ' .$state. '</p>';
    ?>

    This displays my custom field state that i added via users > profile feeds in backend of wordpress

    I put this code under

    <span class="activity"><?php bp_last_activity( bp_displayed_user_id() ); ?></span>

    this is all in the members_header.php in the bp_legacy section


    Lerroy
    Participant

    @lerroy

    @chouf1

    Thanks for the code

    I added to my themes function.php but no luck members directory still shows by username 🙁

    This problem with username / full name seems to be all other these forums in various forms. i am setting up a conference website and users want to find each other buy real names, as usernames dont really identify the user 🙁


    Lerroy
    Participant

    @lerroy

    I have the same problems bump for any solutions ?


    Lerroy
    Participant

    @lerroy

    @Barney

    Thanks for pointing me to that.

    I’m still struggling though PHP aint my thing 🙁

    So the primary field “Name” and my other fields are called “State: and “Organization” and “Website” these are the field names I insert ?

    Heres where i put it..But doesnt show full member-header

    ` </div><!– #item-buttons –>

    <?php
    /***
    * If you’d like to show specific profile fields here use:
    * bp_member_profile_data( ‘field=About Me’ ); — Pass the name of the field
    */
    do_action( ‘bp_profile_header_meta’ ); // Here is one way you could add xprofile fields name as well as the value to the members directory!
    // Just remember to replace “Field-Name” with the names of your fields in the 5 variables in my code.
    // Also remember the field name is case sensitive. If you notice the pattern of 5 in my code you can
    // easily see how to add more fields if you need them. You can also use the div class bph_xprofile_fields
    // to adjust the CSS in your stylesheet. Place this code in bp-custom.php:
    add_action(‘bp_directory_members_item’, ‘bphelp_dpioml’);
    function bphelp_dpioml(){
    $bphelp_my_profile_field_1=’Name’;
    $bphelp_my_profile_field_2=’State’;
    $bphelp_my_profile_field_3=’Organisation’;
    $bphelp_my_profile_field_4=’Website’;
    $bphelp_my_profile_field_5=’About-you’;
    if( is_user_logged_in() && bp_is_members_component() ) { ?>
    <div class=”bph_xprofile_fields” style=” margin-left: 25%;”>
    <?php echo $bphelp_my_profile_field_1 ?>: <?php echo bp_member_profile_data( ‘field=’.$bphelp_my_profile_field_1 ); ?><br />
    <?php echo $bphelp_my_profile_field_2 ?>: <?php echo bp_member_profile_data( ‘field=’.$bphelp_my_profile_field_2 ); ?><br />
    <?php echo $bphelp_my_profile_field_3 ?>: <?php echo bp_member_profile_data( ‘field=’.$bphelp_my_profile_field_3 ); ?><br />
    <?php echo $bphelp_my_profile_field_4 ?>: <?php echo bp_member_profile_data( ‘field=’.$bphelp_my_profile_field_4 ); ?><br />
    <?php echo $bphelp_my_profile_field_5 ?>: <?php echo bp_member_profile_data( ‘field=’.$bphelp_my_profile_field_5 ); ?><br />
    </div><?php
    }
    }

    ?>’


    Lerroy
    Participant

    @lerroy

    Arguments aside.

    I actually need the same thing would like to show Users full name above his @username and show State field and About/ bio field

    Have been reading the buddypress documentation with no luck and searching forums.


    Lerroy
    Participant

    @lerroy

    so good thanks for this


    Lerroy
    Participant

    @lerroy

    Wow this is great thanks


    Lerroy
    Participant

    @lerroy


    @Barney

    Awesome, thanks for that..


    Lerroy
    Participant

    @lerroy

    I use this plugin to do auto complete

    works fine for me.

    https://wordpress.org/plugins/bp-labs/

Viewing 11 replies - 1 through 11 (of 11 total)
Skip to toolbar