Issue with the User Logout Button in WordPress 2.7

I noticed a small issue in WordPress 2.7 when I was designing a login bar at the top of a client’s site and the logout link would not log the user out. I had coded the same way I had coded a logout button in the past, but it wouldn’t function properly. That is because WordPress 2.7 uses a new function to log a user out.

Here is the code I use to use:

Logout

And here is the new code I now use:

Logout

And here is a little bit of spice to make it redirect back to the current page:

Logout

Nore: If you are using an theme that was designed before 2.7, you should go into your comments.php file and change the anchor tag around line 78 to fix your Logout link.

Share this:

Email
Facebook
Twitter
Pinterest
Pocket

Premium Themes for WordPress

Looking for an easy-to-use Premium Theme for WordPress? Check out Themes by bavotasan.com and have your site up and running in no time.

Use this WordPress website builder to build powerful websites in no time for your or your clients.

WordPress Hosting

WP Engine – designed from the ground-up to support and enhance the workflow of web designers.

Bluehost – providing quality web hosting solutions since 1996.

About the author

Picture of Luke Perrie

Luke Perrie