Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1087650
    JP
    Participant

    hi

    how can i change the ‘sale’ image on products?

    #1088008
    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 CSS in child theme function.php file:

    add_filter( 'woocommerce_sale_flash', 'my_custom_sales_badge' );
    function my_custom_sales_badge() {
    	$img = '<span class="onsale"><img src="http://yourwebsite.com/wp-content/uploads/2014/11/custom-sales-badge.png" /></span>';
    	return $img;
    }

    You will have to replace the path of image.

    After that add following code under Custom > CSS in the Customizer:

    .woocommerce .onsale {
        background: transparent !important;
        box-shadow: none !important;
    }

    Thanks.

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