-
Mat commented on the post, BuddyPress 3.0 Beta 2, on the site BuddyPress.org 6 years, 7 months ago
Great news.
A question, though : is it beta 1 or 2 that we can test ?
This link is given in the post : https://downloads.wordpress.org/plugin/buddypress.3.0.0-beta1.zip
Thanks
Mat -
Mat replied to the topic Show logged in firstname outside the loop in the forum How-to & Troubleshooting 7 years, 11 months ago
For the record, this works.
<?php $userid = bp_loggedin_user_id(); ?>
<a href="<?php bp_loggedin_user_domain() ?>">Bonjour, <?php bp_get_user_firstname ( bp_get_loggedin_user_fullname ( $userid ) ) ?></a>Hope it could help someone. 🙂
-
Mat replied to the topic Show logged in firstname outside the loop in the forum How-to & Troubleshooting 7 years, 11 months ago
This seems to work :
$userid = bp_loggedin_user_id();
echo bp_get_user_firstname ( bp_get_loggedin_user_fullname ( $userid ) )Is it a correct way to do so ?
Now, what if I want to link this name to the user profile ?
Any help would be much appreciated ! Thanks ! 🙂
-
Mat replied to the topic Show logged in firstname outside the loop in the forum How-to & Troubleshooting 7 years, 11 months ago
With this :
$userid = bp_loggedin_user_id();
echo bp_core_get_user_displayname( $userid )I can have the full name. Now I try to find the user firstname.
-
Mat started the topic Show logged in firstname outside the loop in the forum How-to & Troubleshooting 7 years, 11 months ago
Hello,
I’m using WP 4.7 and BuddyPress 2.7.3.
I’m trying to display the username of the current logged in user somewhere in my navigation, outside the BuddyPress loop, before
<div id=buddypress></div>
.More specifically, I want to use
bp_get_user_firstname
.Can you please give me some tips to do so ?
Thanks !
Mat
@mat2010
Active 7 years ago