• Resolved schwarzkopf.club

    (@schwarzkopfclub)


    Hey,

    i want to show the fullname of the he enters in buddypress, but i’m not skilled enough with php to archive that.

    there is this code, where i can show the fullname instead of username for buddypress:

    /* Display Username in Directory */
    function my_member_username() {
        global $members_template;
    
        return $members_template->member->fullname;
    }
    add_filter('bp_member_name','my_member_username');

    I think i need to change this line somehow, but as i said i’m not skilled enough to do so:
    $variableDisplayName = $wpUser->display_name;

    I would really appreciate the help

    thanks

Viewing 1 replies (of 1 total)
  • Plugin Author Marcin

    (@marcinlawrowski)

    Hi,

    Try something like this:
    $variableDisplayName = bp_core_get_user_displayname($wpUser->ID);

    Thanks

Viewing 1 replies (of 1 total)
  • The topic ‘How to show the Buddypress Fullname instead of Username’ is closed to new replies.