Dependant Links
-
Hey,
Im curious how I’d go about having a link that is dependent on being logged in.
I’d like to change the “My Account” link on my Navigation Bar to a “Log In” button that would direct you to the login page and once logged in revert back to the “My Account” link
Ive found this code
function loginlogout_button() { if ( is_user_logged_in() ) {?> <div id="loginbutton"><a>" title="Logout">Logout</a></div><?php; } else {?> <div id="loginbutton"><a href="[USER DEFINED URL]" title="Login">Login</a></div><?php; };
But I’m unsure how to implement it on to my site specifically
Thanks
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Dependant Links’ is closed to new replies.