Check out /plugins/buddypress/bp-core/bp-core-templatetags.php
Specifically:
bp_get_member_permalink()
[EDIT]
You’re looking for user_login for the “membername” part.
Look at:
http://codex.wordpress.org/Function_Reference/get_userdata
http://codex.wordpress.org/Function_Reference/get_currentuserinfo
r-a-y, thanks so much for the reply. I think I’m sooo close to what I’m trying to accomplish, but I can’t seem to get the name to echo.. for ex. I’d like to create a link like http://siteurl.com/members/<?php echo user_login() ;?>/profile
Could you point me in the right direction as to how to do this?
Many Many Thanks!
If you just want to output a link with the logged in user’s name, use:
<?php bp_loggedinuser_link() ?>
Thanks, that definitely works, but instead of the entire link I just need to echo the username
for ex. <?php bp_loggedinuser_link() ?> gets me the text “george” which is a link to http://mysite.com/members/george/
I’d like to get just the user name “george” with no link attached. Is this possible?
Thanks for taking the time to respond, much appreciated.
@geo407
Try this wherever you want the username to appear:
<?php bp_loggedin_user_username() ?>
Should work
@smuda
I honestly can’t say if it’s better or not ‘cuz I’m a php newbie. Someone more knowledgeable than I would have to answer that question.
What I can say though is that it works just fine.
Sorry I can’t be of more help than that…