Viewing 15 replies - 1 through 15 (of 17 total)
  • Add some CSS to your theme:

    .onsale { display: none !important; }

    Or avoid the !important and use:

    body.woocommerce span.onsale,
    body.woocommerce-page span.onsale {
       display: none;
    }
    Plugin Contributor James Koster

    (@jameskoster)

    Or actually remove the markup entirely;

    remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_show_product_loop_sale_flash', 10 );

    Thanks James ??

    Thread Starter marckleinmanngmailcom

    (@marckleinmanngmailcom)

    Can someone please tell me where to add this exactly?

    In your theme functions.php

    Thread Starter marckleinmanngmailcom

    (@marckleinmanngmailcom)

    I’ve tried adding this in several spots with no luck. Sorry to be such pest but can you tell me exactly where in the functions.php?

    I use a child theme that allows me to have a functions.php file to add customizations to, but you could do so in your main theme functions.php file.

    You should be able to just added the code,

    // remove "Sale" icon from product images
    remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_show_product_loop_sale_flash', 10 );

    to the the end of the functions.php file, before the last ?> if it has one.

    Thread Starter marckleinmanngmailcom

    (@marckleinmanngmailcom)

    Sorry – still can;t get this work. I’ve tried add the code to my main theme functions.php at the very end but it doesnt change anything.

    That worked for the listed items, but what about the product details page?

    Thread Starter marckleinmanngmailcom

    (@marckleinmanngmailcom)

    @damboom – Can you tell me what code and where exactly you inserted it. I cannot get it to work. Thx, Marc – Sorry…I’m not a coder so this is new ground for me.

    Damboom, your right.. it does not seem to affect the product detail page sale icon, although I thought it did at first.

    Got a solution James? I am using WooCommerce for two clients that are either not implementing an actual ecommerce (but may need to in the future), or redirecting to 3rd party (Etsy).

    the code was posted in another thread.

    link to other post

    correct code:

    remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_show_product_loop_sale_flash', 10 );
    remove_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_sale_flash', 10 );

    IgniteWoo has the correct answer !

    Getting ‘fancy’ with function includes and remove actions etc is ONLY required if really necessary.

    Since the ‘simple’ CSS change does not impact the functionality of woocommerce this is the the better method to use.

    Is it possible to remove this badge / tag for specific products?

    Regards

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Remove "Sale" tag on product image’ is closed to new replies.