Jump to content

Hiding the products of a category from the main store, while keeping the link for that category visible on the main store

Go to solution Solved by Luai,

Recommended Posts

Site URL: https://www.corgimedia.co

Hi,

I made a store with 3 categories, Presets, Prints and Merch.

I want to hide the Prints from the main store, while keeping the merch and presets visible. I found a post that helped hide all products with the following code injection:

Quote
<style>
   
  /*
   
  begin store category all list hide
   
  Version : 1.0
   
  SS Version : 7.1
   
  By : Thomas Creedon < http://www.tomsWeb.consulting/ >
   
  no user serviceable parts below
   
  */
   
  .nested-category-children ~ .products-flex-container {
   
  display: none !important;
   
  }
   
  </style>

is there a way to either manipulate this code or a new code that could do what I'm trying to achieve? 

Thanks

Link to comment
On 8/18/2022 at 6:21 AM, Luai said:

so, hide the products that belong to prints category from the main store.

but keep the link on the main store. so you can click on prints and it'll show you the prints.

Try adding this to Design > Custom CSS

div.tag-prints.grid-item {
    display: none;
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • Solution

I got it for anyone who's running into the same issue.

 
 

 

<style>

.nested-category-children ~ .products-flex-container .tag-prints

 {

  display: none !important;
   
       }
   
  </style>

 

So you use the tag of the category you're trying to hide after the .products-flex-container but make sure to put a space before .tag-"whatever your tag is"

Edited by Luai
Link to comment
  • 2 months later...

Hi Luai (and whomever else)

I'm trying to do what I think you were trying to do, but I'm not sure how to implement this. I'm at ubufoods.com. I want to set up a category for wholesale customers with a password protected category page. I obviously don't want these product items to show up on the main store page which is geared towards retail customers. Where exactly do I inject this code? I tried Design>Custom CSS and that didn't seem to have an impact. I swapped in the name of one of my categories.

Link to comment
On 11/9/2022 at 11:57 PM, AlexMogens said:

Hi Luai (and whomever else)

I'm trying to do what I think you were trying to do, but I'm not sure how to implement this. I'm at ubufoods.com. I want to set up a category for wholesale customers with a password protected category page. I obviously don't want these product items to show up on the main store page which is geared towards retail customers. Where exactly do I inject this code? I tried Design>Custom CSS and that didn't seem to have an impact. I swapped in the name of one of my categories.

That code is in Settings > Advanced > Code Injection

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 1 year later...
On 8/26/2022 at 2:46 AM, Luai said:

I got it for anyone who's running into the same issue.

 
 

 

<style>

.nested-category-children ~ .products-flex-container .tag-prints

 {

  display: none !important;
   
       }
   
  </style>

 

So you use the tag of the category you're trying to hide after the .products-flex-container but make sure to put a space before .tag-"whatever your tag is"

I cannot tell you how long I've been searching for this! Thank you so much!

Link to comment

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.