This topic has 9 replies, 2 voices, and was last updated 1 months, 4 weeks ago ago by Andrew Mitchell
When some user login in to our site by social link or standard login functionality then it should be redirect to site home page.
Right now it is directing to the account page.
Please help me on above changes
Hello, modestyestore,
At the moment, the theme does not have this functionality. However, if you provide us with FTP access, we can perform a small customization and add a redirect to the homepage for you.
Best regards,
8Theme Team
Can you provide these customization with step by step process
Hello, modestyestore,
1) Kindly note that you need to have a child theme in place. Unfortunately, we are unable to verify whether you have one, as the provided access credentials are no longer valid.
2) Additionally, you will need to add the following code to the functions.php of your child theme
add_action('woocommerce_login_redirect', 'et_custom_login_redirect', 10, 2);
function et_custom_login_redirect($redirect, $user) {
if (is_account_page() && !is_wp_error($user)) {
return home_url();
}
return $redirect;
}
add_filter('et_authorize_redirect', 'et_custom_social_login_redirect' );
function et_custom_social_login_redirect() {
return 'home';
}
Best regards,
8Theme’s Team
Thanks for helping me, when I am login with social media then it is working.
But when i am login with user name and password then it is not redirecting to home page.
I am waiting for your response. If you have any query then please let me know.
Hello, modestyestore,
Please try the following code:
add_action('woocommerce_login_redirect', 'et_custom_login_redirect', 10, 2);
function et_custom_login_redirect($redirect, $user) {
return home_url();
}
Best regards,
The 8Theme Team
Thanks a lot, It is working for both cases.
Dear modestyestore,
Choosing our theme reflects your commitment to quality, and for that, we’re genuinely grateful. As we constantly strive to elevate your experience, your feedback is an invaluable gift. Could you kindly take a moment to rate our product with 5 stars on ThemeForest?
Click here to share your insights: https://themeforest.net/downloads
Your support fuels our journey, and we appreciate it more than words can express.
Best Regards,
The 8Theme Team
The issue related to '‘Redirect to home page after login into site’' has been successfully resolved, and the topic is now closed for further responses