feed me feed me chillireward

Article (in detail)

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)
Login button example
logout button example

/*we figure out if user is logged in?  If not logged in, show <login> button, else show <logout> button */

     a href=’/ wp-login.php”target=“new” class=“login”> login

     <a href="http://chilligavva.com/wp-admin/%E2%80%9C%3C">/ wp-login.php?action=logout” target=“new” class=“logout”> logout </a>

     <br clear="“all”" />
</logout></login>

Instead of styling the link classes, you can also just change the text message to say whatever you want.

Popularity: 42% [?]

Page copy
protected against web site content infringement by Copyscape

Liked this article? Subscribe to the article feed via feedburner. Dont want to be hassled by feeds, you can Subscribe by E-mail. Want to know who said what? Get my comments feed. Dont know what a RSS feed is? Read about RSS feeds.

Other Posts for you to Enjoy

one
comment

31 Oct 20077:15 am
 
01
mybloglog avatar
Shinade said

Thank you for the lovely invite to come see your new look. Whiuch by the way is fabulous. Of course it was lovely before. But, it always feels good to get a make over huh? You did an excellent job. And Happy Halloween to you also!! Blessings of peace!

 

Feedback Please!

Note: Your comments may take time to appear, as they are moderated for the first time..

All comments are followed.

 
 
Security Image