Tagged: x
-
AuthorPosts
-
December 13, 2016 at 4:31 pm #1291937
Hi Support,
I found in previous thread the code you gave to remove “add to cart” button from all product pages
.single-product .single_add_to_cart_button {
display: none !important;
}Now, could you tell me how to remove the button on specific product page? I suppose I have to add page ID #, right?
Thank you in advance,
Gianni
December 13, 2016 at 10:54 pm #1292246Hello Gianni,
Thanks for writing in!
You need to prefix page in above code. For example:
.page-id-5002 .single-product .single_add_to_cart_button { display: none !important; }
Please replace
5002
with the page id on which you don’t want to display add to cart button.Thanks.
December 14, 2016 at 10:40 am #1292941Thanks a lot !
December 14, 2016 at 10:52 am #1292972You are most welcome. 🙂
December 14, 2016 at 3:17 pm #1293317This reply has been marked as private.December 14, 2016 at 8:21 pm #1293693Hi there,
Please change the CSS to this
.postid-12875.single-product .woocommerce .cart { display: none !important; }
Hope this helps.
December 15, 2016 at 2:40 pm #1294723Sorry Support but this is not working either.
Cart is still in the product page.
any other clue?
Gianni
December 15, 2016 at 4:51 pm #1294865Hi Gianni,
Please try this:
.postid-12875.single-product.woocommerce .cart { display: none !important; }
Hope this helps.
December 15, 2016 at 6:23 pm #1294954Hi Jade, Support
Nope it doesn’t work either. Add to cart button is still there
to be sure that there is no issue related to this particular product, i tried other IDs # but add to cart still remain.
Sounds weird but problematic…hope you will find a hook.
Gianni
December 15, 2016 at 8:59 pm #1295186Hi Gianni,
Please use this CSS instead:
.postid-12875.woocommerce div.product form.cart .button { display: none; } .postid-12875.woocommerce div.product .product_meta { top: -27px !important; }
See this implementation:http://screencast-o-matic.com/watch/cDlDn9QZfw
Hope this helps.
December 16, 2016 at 2:18 pm #1295937Hi Lely, Support,
I’ve added the code in custom css, then, followed your screencast but I do not have the same developer’s panel view than you.
When I select <button type=”submit” class=”single_add_to_cart_button button alt”>Acquista</button> I do not have same code on the right panel that what is on screencast (see attachment 1&2)
The only way I have to hide the button is to right-click on <button type=”submit” class=”single_add_to_cart_button button alt”>Acquista</button> and select “Hide element” but no way to save it (or at least I do not know how)
Could you tell me how to fix this please?
Cheers
GianniDecember 16, 2016 at 3:40 pm #1296023Support,
In fine I took out price for this product and obviously the add to cart disappeared but it will not be possible to do so in other similar products.
I will need anyway a fix for future identical cases.
Best,
G
December 16, 2016 at 4:38 pm #1296081HI G,
There must be some CSS conflict in the CSS code that is currently in the customizer that’s why the CSS provided to you weren’t working.
Kindly provide your admin details so we can check.
December 18, 2016 at 10:40 pm #1297720This reply has been marked as private.December 18, 2016 at 11:27 pm #1297738This reply has been marked as private. -
AuthorPosts