Search Results for 'bp_get_loggedin_user_link'
-
Search Results
I’m interested in this fix as well, but don’t quite understand how to put together bp_get_loggedin_user_link() and is_user_logged_in() to make a link to the members profile page.
I’m using the sidebar login widget and when you click profile on the sidebar once logged in, it goes to the WP profile page on the backend, not the buddypress profile.
Is there a way to use your above method to patch this somehow? I figured this was how it was supposed to be but I did something wrong? Thanks
Here you go:
<?php if(is_user_logged_in()) : ?>
<a href="<?php echo bp_get_loggedin_user_link(); ?>"><img src="LINK TO YOUR BUTTON" alt="My Profile" /></a>
<?php endif; ?>
Edit:I tried twice to post the complete code,but no success.
well here is what you need
use bp_get_loggedin_user_link().It will point to user profile.Use it with a combination of is_user_logged_in() mto make it more useful
you mean this?
<?php echo bp_get_loggedin_user_link($bp->loggedin_user->id) ?>
See also: WordPress.org • bbPress.org • BuddyPress.org • Matt • Blog RSS