Tips and Tricks HQ Support Portal › Forums › WP eMember › Question about adding login status to Nav bar on page › Reply To: Question about adding login status to Nav bar on page
January 13, 2010 at 7:50 am
#17190
Participant
You will need to add a bit of PHP code to check if the member is logged in or not and depending on that you can show different links.
Following is an example of PHP code that you can potentially use
if (function_exists('wp_eMember_install'))
{
$emember_auth = Emember_Auth::getInstance();
$user_id = $emember_auth ->getUserInfo('member_id');
if (!empty($user_id))
{
//Member is logged in so display whatever you want
}
else
{
//Member is not logged in
}
}