-
Author
Tagged: full name, displayname, fullname, buddypress, profile, display, BP, display name
-
June 5, 2016 at 03:46 #1244185high-photohubParticipant
Hi,
I’m trying to show members full name in their BP profile headers as well as their @user name. I did have it working a while ago by editing a copy of bp member-header.php in my child theme – but now it just doesn’t work!
Has Kleo done something regarding this is an update?
Would appreciate some help in fixing this.
Many thanks, j
June 6, 2016 at 18:24 #124532RaduModeratorHi,
Are you sure that the child theme is activated ? try to deactivate, activate.
Also you can try with this plugin : https://wordpress.org/plugins/buddypress-real-names/
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionJuly 10, 2016 at 06:37 #1286235high-photohubParticipant@ Radu,
Sorry it’s taken so long to reply – just as well though as (rather embarrassingly) i found that I had in fact forgotten to change back to my child theme after doing some tests with the original Kleo theme! Duh!
BUT it’s still not working, yet it was a few months back- but now only showing the @username in members’ profiles.
What I want, and had, is for the member’s full name to sit above the @users’ name just below it, and this is the code I’m using in the BP member-header.php in my child theme:
COPY CODE<?php /** * Fires before the display of a member's header. * @since 1.2.0 */ do_action( 'bp_before_member_header' ); ?> <div id="item-header-avatar"> <a href="<?php bp_displayed_user_link(); ?>"> <?php bp_displayed_user_avatar( 'type=full' ); ?> </a> </div><!-- #item-header-avatar --> <div id="item-header-content"> <?php if ( bp_is_active( 'activity' ) && bp_activity_do_mentions() ) : ?> <br><h2 class="user-nicename"><?php bp_displayed_user_displayname(); ?></h2>/br> <h2 class="user-nicename">@<?php bp_displayed_user_mentionname(); ?></h2> <?php endif; ?> <span class="activity"><?php bp_last_activity( bp_displayed_user_id() ); ?></span> <?php
And I’ve tried it with
bp_displayed_user_displayname
andbp_displayed_user_fullname
.Can you confirm if I’ve put the code in the correct place? Or do I have to add something else in the child functions.php as I’ve read?
I appreciate this isn’t essential to make my site work, but it makes it much easier for members.
Many thanks, j
July 10, 2016 at 06:52 #1286245high-photohubParticipantPS: also tries with
bp_displayed_user_niename
and it doesn’t work. So I’m either inputing the wromg code or got it in the wrong place!
Any ideas?
Cheers, jJuly 11, 2016 at 16:55 #128785RaduModeratorHi,
Try like this
COPY CODE$sq7bpusername = bp_displayed_user_displayname(bp_displayed_user_id()); echo $sq7bpusername;
If this it not works try to add global $bp before the declarations something like this
COPY CODEglobal $bp; $sq7bpusername = bp_displayed_user_displayname(bp_displayed_user_id()); echo $sq7bpusername;
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionJuly 14, 2016 at 04:38 #1291645high-photohubParticipantThanks for your quick reply Radu.
Just to be clear for the code placement, would I put your suggested code in the same BP member-header.php in my child theme? As it looks quite different to the code that’s currently there (as above).
– If so could you clarify which bits it would replace in it?
– And if not which file would I put it in?
Cheers, jJuly 14, 2016 at 16:52 #129199RaduModeratorInstead of bp_displayed_user_displayname() from this context :
/br>
But this should work by default… try also to de-activate all plugins except buddypress and disable also the child theme and try again also if you have some cache plugin purche caches and de-activate it.
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
The forum ‘General questions’ is closed to new topics and replies.