I want to add a piece of code to display some text saying “Welcome, username” in the WordPress Menus. This will only display when a Buddypress user has logged in and it links them to their profile page.
It is currently displaying the user ID correctly – obviously because the code states bp_loggedin_user_id() – but anything else I try doesnt work. Most terms just leave the space blank and all it returns is “Welcome, ”
If I use bp_loggedin_user_username(), the username displays, but it breaks out of the code and places itself outside of the tags.