Skip to content

Instantly share code, notes, and snippets.

@kraftbj
Created February 5, 2013 20:33
Show Gist options
  • Save kraftbj/4717417 to your computer and use it in GitHub Desktop.
Save kraftbj/4717417 to your computer and use it in GitHub Desktop.
Redirect to home page after logout
add_filter('logout_url', 'logout_go_home', 10, 2);
function logout_go_home($logouturl, $redir)
{
$redir = get_option('siteurl');
return $logouturl . '&redirect_to=' . urlencode($redir);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment