• Resolved roperjonathan

    (@roperjonathan)


    Hi there,

    I want to use the WooCommerce shortcode to show products from a specific category on a page.

    To do this, I added the following shortcode.

    [product_category category="clearance"]

    While this works absolutely fine if there are products, if there are no products, then it doesn’t give any message that says that and just shows nothing. However, I notice that if you are looking at the page that the website makes for the product category, then there is a message to say that no products exist for the category.

    Is there a way that I can make it display a message saying something like “There are no products in this category?” Or is there a way that I could take the message that is being shown on the product category page and make it also work for the shortcode?

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

    (@riaanknoetze)

    Hi there,

    The reason for that is the original category page is *generated* whereas the shortcode page is a static one that depends on content being added manually by the user (in this case a shortcode).

    To tweak that shortcode to display a specific message when no products are displayed when using the shortcode would require a fair amount of customisation. It’s possible but given the extent of the coding involved, I recommend getting in touch with a web developer or one of the experts listed at https://woocommerce.com/customizations/

    Plugin Support con

    (@conschneider)

    Engineer

    Hi there,

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

    Kind regards,

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Show no products found message when using woocommerce product_category shortcode’ is closed to new replies.