Jump to content

i dont want a category to show up when there arent products in that category on the products list page

Recommended Posts

Hi! I would like to know how to hide a category in a store (in the products list view) -  when there are no products tagged or labeled with that category. I don't want the client to have to manually toggle "make category visible" (or whatever that says) in the settings every time there is no inventory in that category. I want it to just automatically hide the category from navigation when nothing is labeled that way. 

For instance - in this store, she will have a certain set of product categories of plants, but currently only has inventory in a couple of the categories. So until the inventory is added and labeled with the category - it is in the navigation and opens to an empty page. What css or js could hide the category until something is labeled with that category?

The attached screenshot shows the "All Plants" (she names them something else super long and silly - but it is "all products") then all categories are displayed, and you click on "Gallon Pots" and there's an empty page.

 

site: www.girlrunfarm.com 

pw: plants

Screenshot 2024-09-12 at 2.27.04 PM.png

Screenshot 2024-09-12 at 2.27.12 PM.png

Link to comment
  • Replies 2
  • Views 327
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.