Support,
I already have a logout link in the top bar that display only when a user is logged in. This is the current code:
<a href="login013579/?action=logout&_wpnonce=e1b4d6e82b" class="wp-logout-url"><i class="x-icon-sign-out" data-x-icon=""></i> Logout </a>
I have also added a rediect fuction in my functions.php file:
// Redirect to Home Page upon logout
// =============================================================================
add_action(‘wp_logout’,‘auto_redirect_after_logout’);
function auto_redirect_after_logout(){
wp_redirect( home_url() );
exit();
}
Problem is this section of my code changes: wpnonce=e1b4d6e82b"
I would like to bypass the Wordpress Failure notice and have the user automatically redirected to the homepage upon clicking the Logout link.
Is this possible?
Thanks,
Chuck