Support » Plugin: OnSale Page for WooCommerce » Display message when no product on sale

  • Resolved Justin Dixon

    (@justin-dixon)


    Hello,

    Would it be possible to give the option to show a message when there are no items currently for sale?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author wpgenie2

    (@wpgenie2)

    Hi,

    you can do something like this – copy archive-product.php template to your theme and modify part / line

    wc_get_template( 'loop/no-products-found.php' );

    with:

    <?php
                if($wp_query->is_sale_page) {
                    ?>
    
                <p class="woocommerce-info"><?php _e( 'no products on sale', 'essential' ); ?></p>
    
                <?php
                } else {wc_get_template( 'loop/no-products-found.php' ); }
    
                ?>
    Plugin Author wpgenie2

    (@wpgenie2)

    Closing this thread.

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