Answer the question
In order to leave comments, you need to log in
What should I do if the site redirect does not work?
After logging into the account, the user enters the "my account" section, although earlier the user got to the main page, and when clicking on the name of the site, the user should get to the main page, but he is again thrown to the account page.
How to make it so that after logging in the user gets to the main page?
Answer the question
In order to leave comments, you need to log in
Add this code to functions.php. It will replace the standard redirect with the one you need. For the main it is "/".
add_filter('login_redirect', 'loginRedirect');
function loginRedirect() {
return 'http://example.com';
}
It started after installing 1 plugin, but when I removed it, everything remained the same
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question