Posted on August 9, 2013 , Last Modified on: August 9, 2013

A few dynamic link examples

//These links can be added to your child themes template files and styled accordingly
//I wrap these in a if statement to only display to logged in users
if ( is_user_logged_in() ) {
<a href="<?php echo bp_loggedin_user_domain(); ?>">Profile</a>//link to users profile
<a href="<?php global $current_user; echo home_url() . '/members/' . $current_user->user_login . '/friends/'; ?>">Friends</a>//link to users friends 
<a href="<?php global $current_user; echo home_url() . '/members/' . $current_user->user_login . '/messages/'; ?>">Messages</a>//link to users messages
}

#dynamic links