Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1222957
    Dave S
    Participant

    Hello,

    I found this link on the forum to hide the sale icon in Woocommerce.
    https://community.theme.co/forums/topic/how-to-hide-sale-icon-in-woocommerce/

    This works great, but it only applies to the individual product page.

    Is there a way to remove the sale icon site wide?

    #1223304
    Prasant Rai
    Moderator

    Hello There,

    Thanks for writing in!

    Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released.

    Then add following code in child theme function.php file:

    // Remove "Sale" icon from product archive page
    remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_show_product_loop_sale_flash', 20 );
    
    // Remove "Sale" icon from product single page
    remove_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_sale_flash', 20 );

    Thanks.

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