Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #47198
    Samuel B
    Participant

    Hey guys,

    I have been searching for hours but can’t find a way to remove the little cart logo/icon from the ‘add to cart’ button.

    Here’s a picture of my button at the moment:
    http://imgur.com/oyWKF8C

    (as you can see, I’ve changed the text to ‘check it out’)
    How can I remove the little shopping cart icon next to the text?

    Thanks
    Sam

    #47362
    Tom B
    Participant

    It’s not quite the cleanest fix but if you put

    
    .woocommerce .button.product_type_simple:before, .woocommerce .button.single_add_to_cart_button:before, .woocommerce-page .button.product_type_simple:before, .woocommerce-page .button.single_add_to_cart_button:before {
        content: "";
    }
    

    into the custom css section of the customizer it should have the desired effect.

    #47554
    Samuel B
    Participant

    Awesome, thanks Tom!

    #47895
    Rad
    Moderator

    Thanks for helping Tom! 🙂

    #295797
    Mark M
    Participant

    I am looking for a way to do this and the above fix is not working anymore.

    Ideally the fix would be some way of doing it in the functions.php in my child theme. I have already managed to change the button text in there via adding this code. Just need to work out how to remove the cart icon now.

    // Change the add to cart text on single product pages
    add_filter( 'woocommerce_product_single_add_to_cart_text', 'woo_custom_cart_button_text' );    // 2.1 +
    function woo_custom_cart_button_text() {
            return __( 'Request A Sample', 'woocommerce' );
    }
    #296175
    Friech
    Moderator

    Hi There,

    The CSS code above still works on our end. Would you mind providing us the site URL?

    Thanks!

    #296231
    Mark M
    Participant

    Hi,

    My mistake it does work after clearing my cache, sorry.

    Regards,

    Mark

    #296688
    Thai
    Moderator

    You’re most welcome.
    If you need anything else, please let us know 🙂

    #811117
    Wild-Speed
    Participant

    Instead of removing, How can I replace the default shoppingcart icon? For example I’d like to use the fontawesome shopping basket for my ‘add to cart’ buttons:

    <i class=”fa fa-shopping-basket”></i>

    #811400
    Rupok
    Member

    Hi @wild-speed

    Thanks for updating. You ca add the CSS to your Child Theme‘s style.css :

    .woocommerce .button.product_type_simple:before, .woocommerce .button.single_add_to_cart_button:before, .woocommerce-page .button.product_type_simple:before, .woocommerce-page .button.single_add_to_cart_button:before {
        content: "\f291";
    }

    Hope this helps.

    Cheers!

    #811966
    Wild-Speed
    Participant

    Thank you.

    The button shows ‘f291’ with this code and not the icon.

    #812159
    Darshana
    Moderator

    @wild-speed

    Please add the above code into your child theme’s style.css file. If you add it into your Customizer’s Custom > CSS area, it will remove the backslash when saving customizer.

    Thanks!

    #812360
    Wild-Speed
    Participant

    I see, that works but it removes the space between the icon and ‘add to cart’ text though, how can I fix that?

    #812855
    Rue Nel
    Moderator

    Hello There,

    You can make use of this code instead:

    .woocommerce .button.product_type_simple:before, 
    .woocommerce .button.single_add_to_cart_button:before, 
    .woocommerce-page .button.product_type_simple:before, 
    .woocommerce-page .button.single_add_to_cart_button:before {
        content: "\f291";
        margin-right: 5px;
    }

    Please let us know if this works out for you.

    #812860
    Wild-Speed
    Participant

    The icon only works with

    content: "\f291" !important;

    It’s good now, Thanks!

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