Not display Products On Sale if empty
-
Hi,
I’ve added products on sale section to the homepage with the following code:
<section class="best-sales-home"> <h2><a href="/best-sales/">Best Sales</a></h2> <?php echo do_shortcode( '[products on_sale="true" paginate="true" limit="4"]' ); ?> </section>
When there’re no products on sale, nothing appears in that section except the heading (“Best Sales”).
Is there a way to not display that heading in case there’re no products on sale, or at least to show a message like “There’re no items on sale” below the heading?
Thanks.
- This topic was modified 3 years, 8 months ago by .
- This topic was modified 3 years, 8 months ago by .
The page I need help with: [log in to see the link]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Not display Products On Sale if empty’ is closed to new replies.