• Resolved Artomultiplo

    (@protorob)


    What can be the conditional statement to display a widget only if the product archive actually display products.

    I mean, my store is configured like this:
    – Shop page: display categories
    – Category display: Show sub categories
    – If the subcategory have no children, it displays the products

    I would like to know if there’s a conditional statement that allows me to check if I’m looking at an archive of sub-categories or if the archive is displaying products.

    Thanks in advance for the great plugin.

Viewing 1 replies (of 1 total)
  • Saif

    (@babylon1999)

    Hello @protorob,

    What can be the conditional statement to display a widget only if the product archive actually display products.

    I understand that you want to display products based on conditional logic.

    Instead of implementing this with hooks, you can use Jetpack‘s visibility rules:


    Link to image: https://d.pr/i/NNM8Tn

    Please refer to this guide for context. Additionally, Jetpack offers several features that can improve your store’s performance and security. To learn more about these features, you can check out this blog post. :?)

    Cheers!

Viewing 1 replies (of 1 total)
  • The topic ‘How to display a widget only if products are displayed in shop archive?’ is closed to new replies.