Create a Logout button on your WordPress blog

January 6, 2009 · Print This Article

Especially in the case of a multi-author blog, it can be really useful to include a logout link on your theme.

To create a “Logout” link on your WordPress blog, simply paste the following code on your theme:

<a href="<?php echo wp_logout_url(); ?>">Logout</a>

Please note that this will work with WordPress 2.7+ only. If you haven’t switched to WP 2.7 yet, the following code will do (almost) the same job:

<a href="/wp-login.php?action=logout">logout</a>


Your choice for site templates and wordpress themes

Comments

One Response to “Create a Logout button on your WordPress blog”

  1. Posts about Wordpress 2.7 as of 01/06/2009 | The Lessnau Lounge on January 7th, 2009 4:12 am

    […] and bug fixing as follows: 1) WordPress 2.7 no longer allows me to approve comments 2) The post Create a Logout button on your WordPress blog – livexp.net 01/06/2009 Especially in the case of a multi-author blog, it can be really useful to […]

Got something to say?

You must be logged in to post a comment.