Skip to content

Instantly share code, notes, and snippets.

View mikesimpson416's full-sized avatar

mikesimpson416

View GitHub Profile
@andrewlimaza
andrewlimaza / redirect-users-after-logout-wordpress.php
Created June 2, 2020 08:26
Redirect users after logout WordPress
<?php
/**
* Redirect users to home page after logging out of WordPress.
*/
function my_redirect_after_logout_wp(){
wp_redirect( home_url() );
exit;
}
add_action('wp_logout','my_redirect_after_logout_wp');