How to redirect WP Logout page to Homepage

Thanks to Birgir Erlendsson for providing the answer on wordpress forum

 

 If you want to go directly to the frontpage when you logout, place this into your functions.php in your current theme directory:

 

add_action(‘wp_logout’,create_function(”,’wp_redirect(home_url());exit();’));

Leave a Reply

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