Home / Forums / WoodMart support forum / How to remove “Select Options” on mobile
Home › Forums › WoodMart support forum › How to remove “Select Options” on mobile
How to remove “Select Options” on mobile
- This topic has 10 replies, 5 voices, and was last updated 1 year, 5 months ago by
Hung Pham.
-
AuthorPosts
-
January 15, 2024 at 8:38 pm #530101
orders-9631ParticipantHow to remove the “Select options” button below the images on mobile version?
Attachments:
You must be logged in to view attached files.January 16, 2024 at 3:53 am #530164
AlexWaParticipantadd this in your child theme function.php
How to change Select Options -> eg. Chose Size
add_filter( ‘woocommerce_product_add_to_cart_text’ , ‘custom_woocommerce_product_add_to_cart_text’ );
function custom_woocommerce_product_add_to_cart_text() {
global $product;$product_type = $product->product_type;
switch ( $product_type ) {
case ‘simple’:
return __( ‘Add to cart’, ‘woocommerce’ );
break;
case ‘variable’:
return __( ‘Chose Size’, ‘woocommerce’ );
break;}
}
You can change ‘Chose Size’ to your own text.
January 16, 2024 at 6:52 pm #530469
Hung PhamParticipantHi orders-9631,
Thanks for reaching to us.
Did you try @AlexWa Custom Code? Please let me know.
Regards,
January 16, 2024 at 11:55 pm #530564
AlexWaParticipantI use this code in my theme. If I have a single product without variants, I display “Add to Cart.” If the product has variants, I display options such as “chose size”.
January 18, 2024 at 6:04 am #531007
Hung PhamParticipantHi AlexWa,
Thanks for your help.
I will keep this topic opening till topic author confirms his situation.
Regards,
February 19, 2024 at 11:04 am #541274
orders-9631ParticipantHello,
Sorry, but I could not get it to work. I want to completely remove the text, not change it.
Thanks!
February 19, 2024 at 6:35 pm #541497
Hung PhamParticipantHi orders-9631,
Please add the following Custom CSS code to Theme Settings > Custom CSS > Custom CSS for mobile:
.wd-product.wd-hover-standard .product-wrapper .wd-add-btn { display: none; }Regards,
June 20, 2024 at 11:59 am #574105
martin-9344ParticipantHello
I have same issue but adding the css code does not work.
Attachments:
You must be logged in to view attached files.June 20, 2024 at 12:34 pm #574119
Hung PhamParticipantHi martin-9344,
Please submit your own topic and share me your url, then I can take a look and provide better support.
Regards,
July 13, 2024 at 9:09 am #583066
MikeParticipantHellp,
Hide select options for mobile after update woocommerce.
CSS
.wd-product.wd-hover-alt .wd-add-btn>a{
display:none !important
}
this was working for me without functions, only CSS.July 13, 2024 at 12:20 pm #583093
Hung PhamParticipantHi Mike,
Thanks for sharing solutions.
Regards,
-
AuthorPosts
- You must be logged in to create new topics. Login / Register