I want to use another link for logout because I have /wp-admin/*
protected with htpassword. Is there a way to do this? Something like creating a custom page like site.com/logout
then use it as my new logout link?
Thanks!
I want to use another link for logout because I have /wp-admin/*
protected with htpassword. Is there a way to do this? Something like creating a custom page like site.com/logout
then use it as my new logout link?
Thanks!
You can filter 'logout_url'
and return a custom value if you are in the admin area:
add_filter( 'logout_url', 'wpse_58453_logout_url' );
function wpse_58453_logout_url( $default )
{
// set your URL here
return is_admin() ? 'http://example.com/custom' : $default;
}