Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #867922

    bbddmac
    Participant

    Hi,
    I have tried the various solutions to remove the add to cart button on my site but nothing seems to work.
    These are the code I have tried:

    }
    .single-product .quantity input[type=”number”] {
    display: none !important;
    }
    .woocommerce-page a.button.add_to_cart_button {
    display: none !important;

    Java Script:
    a[href^=”/webstore/?add-to-cart”] {
    display: none !important;
    }

    Please assist, thanks!

    Site: bulletinzoom.com
    WP 4.5
    X Version 4.3.4

    #868560

    Prasant Rai
    Moderator

    Hello There,

    Thanks for writing in!

    There seems to be an active under construction page. Kindly provide us with the admin details to your site so that we’ll able to check this further.

    Thank you.

    #870484

    bbddmac
    Participant
    This reply has been marked as private.
    #870848

    Rue Nel
    Moderator

    Hi There,

    Thanks for providing the login information. What you have added in the custom JS is invalia and not a JS code. It is a css and it is also not correct selector to target the button. Please add the following css code in the customizer, Appearance > Customize > Custom > CSS

    This code removes the add to cart button on this page: http://your-domain.com/product-category/theater-productions-programme/

    .woocommerce li.product .entry-header .button.add_to_cart_button,
    .woocommerce li.product .entry-header a[href*="/?add-to-cart="] {
      display: none !important;
    }

    To remove the add to cart button in the single product page like this one: http://your-domain.com/product/the-muted-recital/, you also need to add this code:

    .single-product .button.single_add_to_cart_button{
      display: none !important;
    }

    Hope this helps you. Please let me know.

    #871732

    bbddmac
    Participant

    Thank you for your reply. I tried the recommended solutions but it did not work.

    Damian

    #872451

    Paul R
    Moderator

    Hi Damian,

    You can try this code instead.

    
    .woocommerce li.product .entry-header .button {
        display: none !important;
    }
    

    Hope that helps.

    #872987

    bbddmac
    Participant

    That worked! Thank you for your help.

    DM

    #873691

    Prasant Rai
    Moderator

    You are most welcome. 🙂