• Resolved terratrike

    (@terratrike)


    I’m using the [sale_product] shortcode to display sale items on a page.
    Is there a way to automatically display a “No products on sale” type message if there are no products at the moment?

    [This would go in the section right below the grey header “Deal Of The Day if you’re viewing the page below]

    • This topic was modified 7 years, 3 months ago by terratrike.
    • This topic was modified 7 years, 3 months ago by terratrike.

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

Viewing 1 replies (of 1 total)
  • Sean Cull

    (@seanreloaded)

    Automattic Happiness Engineer

    Hi there,

    I’m using the [sale_product] shortcode to display sale items on a page.
    Is there a way to automatically display a “No products on sale” type message if there are no products at the moment?

    Not by default. Shortcodes don’t really have a way to use conditional logic like that. For sale items, for example, where you uses the [sale_product] or [products on_sale=true], it would either display any products on sale, or just display nothing (blank) if there were no products currently set to be on sale.

    The only way to do that would be to write some additional custom code. You could find a WooCommerce developer to assist via our customizations page if that’s something you wanted to investigate further: https://woocommerce.com/customizations

Viewing 1 replies (of 1 total)

The topic ‘[sale_product] shortcode message’ is closed to new replies.