Tips / Recommendations

Redirect to homepage when logout wordpress

// On functions.php of your child theme or in a code snippet:
add_action('wp_logout','auto_redirect_after_logout');
function auto_redirect_after_logout(){
  wp_redirect( home_url() );
  exit();
}

Leave a Reply

Your email address will not be published. Required fields are marked *

13 − three =