• Resolved alena353

    (@alena353)


    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 alena353.
    • This topic was modified 3 years, 8 months ago by alena353.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Gabriel – a11n

    (@gabrielfuentes)

    Hi there ??

    I would like to let you know that this cannot be added from the WooCommerce core plugin, and this is more oriented to theme functionalities. So this will definitely require quite a bit of additional coding – which goes beyond the scope of support we are able to provide in this forum.

    However, I’m going to leave it open for a bit to see if anyone is able to chime in to help you out.

    I can also recommend the WooCommerce Developer Resources Portal for resources on developing for WooCommerce.

    You can also visit the WooCommerce Facebook group or the #developers channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there, as well.`

    If you do require more help with the actual coding, we’d recommend you hire a developer who can take a look at this, quote you for their services, and help you add this feature to your site. We’d recommend getting in touch with a web developer or one of the customization experts listed at https://woocommerce.com/customizations/.

    Cheers.

    Mirko P.

    (@rainfallnixfig)

    Hi there,

    We’ve not seen any activity on this thread for a while, so I’m marking this thread as resolved.

    Hopefully, you were able to come up with a solution! If you have further questions, please feel free to open a new topic.

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Not display Products On Sale if empty’ is closed to new replies.