• Has anyone been able to come up with a way to use CSS to hide an element if the product is NOT on sale? I have a simple image that I want to only show up if the product is on sale, and automatically hide if it isn’t. I tried using a custom function to add custom CSS into the header with wp_head and a not version of $product->is_on_sale() to try and do so, but nothing worked.

  • The topic ‘Hide if not on sale?’ is closed to new replies.