Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #498389

    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:

    View post on imgur.com

    Peter

    • This topic was modified 8 years, 8 months ago by Kyzoe.
    #498486

    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

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.