Tagged: [L]
Hello,
when i put a item onsale, it gets a on sale tag in Woocommerce, as we do not have so much room on the frontpage i would be able to delete or even better not show this tag in several places on the blog, or maybe move it as a overlay to the top of the image instead from behind the price. I tried to do the following:
added this to the functions.php of the childtheme.
add_filter(‘woocommerce_sale_flash’, ‘my_custom_sale_flash’, 10, 3);
function my_custom_sale_flash($text, $post, $_product) {
return ‘<span class=”onsale”> Promo! </span>’;
}
on pestfree.nl you can see what i mean or click this link for a screenshot:
Peter
Hi Kyzoe!
You can use this CSS to hide it or move it around.
.onsale {
display: none;
position: absolute !important;
right: 30px !important;
top: -40px !important;
}
The “display: none” portion hides it.
Best regards,
Elliott