20
Mar, 2015
Mar, 2015
Creating a Custom Logout Link
You can use the wp_logout_url()
function to create a logout link of your own, and optionally have this link automatically redirect a user back to a custom URL after being logged out of the site.
Quick Example in PHP Code
<a href="<?php echo esc_attr(wp_logout_url('http://example.com/goodbye/')); ?>">logout</a>
- See also: ezPHP for WordPress
- See also:
wp_logout_url()
in the WordPress Codex