Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1211339
    Tim
    Participant

    Hi X,

    Is there a way to not show the add to cart button on certain products in the category pages?

    http://comhsc-siiksaare.savviihq.com/product-categorie/pompen/graco-husky/

    I know this code removes it form all products, but I only want tot target certain products:

    
    .woocommerce li.product .entry-header .button, .woocommerce-page li.product .entry-header .button {
    display: none;
    }
    

    Cheers!

    #1211413
    Thai
    Moderator

    Hi There,

    Please try with this CSS:

    .term-graco-husky li.product .entry-header .button {
        display: none !important;
    }

    The graco-husky is the category slug.

    Regards!

    #1211457
    Tim
    Participant

    Hi Thai,

    Works great, can this also be done on product level?

    Cheers!

    #1211589
    Thai
    Moderator

    Hi Tim,

    You mean to remove the add to cart button on the single product page?

    Thanks.

    #1211700
    Tim
    Participant

    Hi Thai,

    No, I mean in the category page. Just hide the button on a single product (by product id or something). I could not find the correct css for this..

    Thanks.

    #1211799
    Thai
    Moderator

    Hi There,

    Please try with this:

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

    The 560 number is the product ID.

    Regards!

    #1211912
    Tim
    Participant

    Awesome!

    Many thanks:)

    #1212032
    Joao
    Moderator

    Glad to hear it,

    Joao

  • <script> jQuery(function($){ $("#no-reply-1211339 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>