FAQ

Frequently Asked Questions

How to: Create a “Logout” button on your WordPress blog – CodeRevolution

Especially in the case of a multi-author blog, it can be really useful to include a logout link on your theme. In this recipe, I’ll show you how to do this easily. Only suitable for WordPress 2.7.

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>

CodeRevolution Knowledge Base

Video tutorials