Managing state in wordpress
Sometimes we want to display a different button for when you are logged-in and another for when you are not.. (See pictures)
/*we figure out if user is logged in? If not logged in, show button, else show button */
a href='/ wp-login.php”target=“new” class=“login”> login
/ wp-login.php?action=logout” target=“new” class=“logout”> logout
/*we figure out if user is logged in? If not logged in, show button, else show button */
a href='/ wp-login.php”target=“new” class=“login”> login
/ wp-login.php?action=logout” target=“new” class=“logout”> logout
Instead of styling the link classes, you can also just change the text
...