- This topic has 10 replies, 2 voices, and was last updated 3 years, 3 months ago by
Jusung.
-
AuthorPosts
-
February 26, 2023 at 8:05 pm #2548027
Jusung
Hello. I am trying to remove login form when you click my account page.
So, people can see only register form there..page-id-9 .woocommerce .u-column1 { display: none; } .page-id-9 .woocommerce .u-column2 { margin: auto; float: none !important; }This code is used to remove login form and it works well.
However, this code also removes the “edit billing address” section.
I only wanna remove login form.Is there a way to remove only login form?
February 26, 2023 at 8:56 pm #2548049Jusung
I tried to make hook element for this page.
So, user-loged out.
and added the code.but not working..
February 26, 2023 at 9:19 pm #2548056Jusung
.page-id-9 #customer_login .woocommerce .u-column1 { display: none; } .page-id-9 #customer_login .woocommerce .u-column2 { margin: auto; float: none !important; }This is my another trying, but not work..
It has to be a certain page since the same form is being used on other page.
And I try to add the ID cuz (.woocommerce .u-column2) is being used for edit billing address. So, I can’t solely use this..February 26, 2023 at 9:34 pm #2548067Jusung
/* Remove Login on my account*/ .page-id-9 #customer_login.woocommerce.u-column1 { display: none; } .page-id-9 #customer_login.woocommerce.u-column2 { margin: auto; float: none !important; }I don’t know what I am missing.. This is another trying, but doesn”t work..
February 27, 2023 at 5:30 am #2548469David
StaffCustomer SupportHi there,
can i have a login so i can see the Edit Billing address issue ?
February 27, 2023 at 6:22 am #2548534Jusung
I just added the user.
My login page and register page is made using my account and only alloed to reach when logged out.
So, on login, I have to remove register form and on register, I have to remove login form.
But, when I remove the form, it removes the edit billing address part too.
February 27, 2023 at 9:21 am #2548893David
StaffCustomer SupportHave you seen this method of separating login and account forms ?
https://www.businessbloomer.com/woocommerce-separate-login-registration/
February 27, 2023 at 8:37 pm #2549445Jusung
The login and register column is under #customer_login
The addresses feiled is under .woocommerce-AddressesIs there a way to utilize those?
.page-id-9 #customer_login .u-column1 {
display: none;
}
.page-id-9 #customer_login .u-column2 {
margin: auto;
float: none !important;
}Like this for example. that code doesn’t work.
February 27, 2023 at 9:00 pm #2549456Jusung
I just tested the code above and this code is actually working..
.page-id-9 #customer_login .u-column1 { display: none; } .page-id-9 #customer_login .u-column2 { margin: auto; float: none !important; }The only problem is that
people can reach the page of login page even though there are logged in.
So, I added this code to redirect to other page when logged-in user visit the login page.function my_custom_redirect() { if ( is_user_logged_in() && is_page( '362' ) ) { wp_redirect( 'https://abc.com/' ); exit; } } add_filter( 'template_redirect', 'my_custom_redirect' );On my End, everything works well.
Could you check if those codes are gonna be ok to use?
I am not a developer so don’t know well about coding.February 28, 2023 at 6:31 am #2549881David
StaffCustomer SupportThose codes look fine.
But as you have realised, redeveloping Woocommerce is not easy, and every change you make can have repercussions.
And in making these changes, you now have the responsibility of maintaining those changes.
If Woocommerce updates its code it could mean something you have changed will no longer work.Unless you have a Woocommerce developer to hand then i would strongly advise against changing these kinds of things. The standard woocommerce pages may not look pretty, but they work as intended….
February 28, 2023 at 7:53 am #2550082Jusung
You are completely right..
So far, I am understanding all the codes I changed.
I will try to make as less change as possible.Thank you for the advice!!
-
AuthorPosts
- You must be logged in to reply to this topic.