25% off ProSNIPC25OFF

Redirect Users After Logout

Redirects users to the site homepage instead of the login screen after they click Log Out.

PHPby SnipCraft
php
<?php
if ( ! function_exists( 'scseed_logout_redirect' ) ) {
    function scseed_logout_redirect( $redirect_to, $requested_redirect_to, $user ) {
        return home_url( '/' );
    }
    add_filter( 'logout_redirect', 'scseed_logout_redirect', 10, 3 );
}
#login#logout#redirect#users