Last active
August 29, 2015 14:06
-
-
Save modemlooper/0dc904a89fefb79bf6bd to your computer and use it in GitHub Desktop.
Linking to BP profiles in WP templates
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When linking to BP content it's best to use BP functions. This method is good because it shows somebody else that it's BP content that the link is going to. | |
bp_loggedin_user_domain() // url to logged in user profile | |
bp_loggedin_user_username() | |
bp_loggedin_user_id() | |
bp_displayed_user_username() // use displayed for when you are on a profile instead of loggedin | |
or you can use this to display a complete anchor link to logged in user | |
bp_core_get_userlink( bp_loggedin_user_id() ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment