You can place PHP snippets at the bottom of your child theme functions. CSS, on the other hand, goes in your child theme style. Make sure you know what you are doing when editing such files - if you need more guidance, please take a look at my free video tutorial "Where to Place WooCommerce Customization? Thank you in advance :. Check out these free video tutorials. You can learn how to customize WooCommerce without unnecessary plugins, how to properly configure the WooCommerce plugin settings and even how to master WooCommerce troubleshooting in case of a bug!
Why We Should Do Login Redirect To Previous Page?
If someone clicks on woocommerce product, then first it will redirect to login page. After successfull login again it will redirect to previous product page where the user are. Hi, I had a similar issue when I upgrade to Version 6. If user is not logged in it will redirect to wp default login page. After successful login again it will redirect to previous product page. Where the user are. If someone wants to disable wp default login use User Profile Made Easy plugin and disable wp default login.
An Ideal Place to Add Code in WordPress
Do you want to redirect users back to the page they were viewing after logging in? If you liked this code snippet, please consider checking out our other articles on the site like: 62 best free WordPress blog themes and how to create a contact form in WordPress. And it works. I think Woocommerce login page strips redirect part from url. Sadly there could be a number of causes.
Scratch Code. Last updated on December 23, by ScratchCode Team. Sometimes, It is required to redirect users back to the page they were viewing before logging in. There could be a plugin for this but we are not suggesting to use a plugin for small things. So that we have created a code snippet that will help you after login redirect to previous page in WordPress. Normally, people are not drawing enough attentions to the smallest things. So they will log in to the site and try to find the same page which gives a wrong impression of your site.