DEV Community

Cover image for Redirect user to homepage after login/logout in WordPress
Chris Texe
Chris Texe

Posted on • Updated on • Originally published at madlon.eu

Redirect user to homepage after login/logout in WordPress

Let’s assume you have a WooCommerce shop in multisite WordPress installation. When user will logout then is redirected to main website from your multisite. User should be redirected to homepage of your store. If you want to redirect user to homepage after login or logout in WordPress put this code in functins.php file:

After saving the file user after logout will be redirected to homepage.

Top comments (0)