Jump to content

Hide a category in Shop Filtering

Go to solution Solved by tuanphan,

Recommended Posts

  • Solution

Add to Home > Design > Custom CSS

.products.collection-content-wrapper .category-filter-item:nth-child(15), .products.collection-content-wrapper .category-filter-item:nth-child(15)+span {
    display: none;
}

 

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

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment

legend, thanks Tuan! - always a great help.

last question - my objective with the above request is to hide a category, but also hide the product associated with that category with the shop. 

i have the regular store, but i also have a hidden area on the site where we had other products (filtered by the hidden category) to buy. can i keep the other products from showing up in the regular store? or do i need to create a new store within the site?

Thanks Tuan

Link to comment

Tuan, again, to the rescue. 
For the second part - the above question - he gave me the below code, which worked great

 

Add to Home > design > custom CSS

.category-the-vault.grid-item {
    display: none;
}
Link to comment
  • 4 months later...

Hi I'm trying to do this as well but can't seem to get the code to work, no idea what I'm doing to be honest..! 

Trying to hide the category and products in "Digital" https://www.felixcollier.co.uk/gallery

Any help would be greatly appreciated.

On 5/6/2020 at 9:29 AM, tuanphan said:

Add to Home > Design > Custom CSS




.products.collection-content-wrapper .category-filter-item:nth-child(15), .products.collection-content-wrapper .category-filter-item:nth-child(15)+span {
    display: none;
}

 

 

Edited by FelixCollier
Link to comment
On 10/4/2020 at 9:52 PM, FelixCollier said:

Hi I'm trying to do this as well but can't seem to get the code to work, no idea what I'm doing to be honest..! 

Trying to hide the category and products in "Digital" https://www.felixcollier.co.uk/gallery

Any help would be greatly appreciated.

 

Add to Gallery Page Settings > Advanced > Header

<style>
  nav.category-nav {
    display: none;
}
</style>

 

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

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
  • 1 month later...

Add the following to Store Settings > Advanced > Page Header Code Injection.

<style>

  /* hide debutante */
  
  .ProductList-filter-list-item:nth-child( 3 ) {
  
    display: none;
    
    }
    
  </style>

This is for a v7.0 site using the Brine template and is customized for @deandra.olivieri's needs as of this posting.

This CSS is hiding debutante based on position in categories. If the categories change then the position will need to be updated.

Let us know how it goes.

Edited by creedon
fixed syntax error

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
On 12/2/2020 at 5:14 AM, deandra.olivieri said:

the code did not work

I fixed a syntax error so it should now work in the original intended location. Either works really just depends on how one wants to organize their code.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
  • 8 months later...
On 12/2/2020 at 12:59 AM, creedon said:

Add the following to Store Settings > Advanced > Page Header Code Injection.

<style>

  /* hide debutante */
  
  .ProductList-filter-list-item:nth-child( 3 ) {
  
    display: none;
    
    }
    
  </style>

This is for a v7.0 site using the Brine template and is customized for @deandra.olivieri's needs as of this posting.

This CSS is hiding debutante based on position in categories. If the categories change then the position will need to be updated.

Let us know how it goes.

Hi @creedon can you help me to hide the category nav on my shop page?

 

2039791658_ScreenShot2021-08-19at10_49_49AM.thumb.png.b2c903335b597d1fbcbf63ae87579e36.png

Link to comment
3 hours ago, goodformvintage said:

can you help me to hide the category nav on my shop page?

Please post the URL for the product grid on your site.

If your site is not public please set up a site-wide password, if you've not already done so.

Post the password here.

Adding a site-wide password is not a security breach. Please read the documentation at the link provided to understand how it works.

We can then take a look at your issue.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
1 hour ago, creedon said:

Please post the URL for the product grid on your site.

If your site is not public please set up a site-wide password, if you've not already done so.

Post the password here.

Adding a site-wide password is not a security breach. Please read the documentation at the link provided to understand how it works.

We can then take a look at your issue.

I figured it out! Thanks for your response!

Link to comment
  • 11 months later...
1 hour ago, kirrily said:

I'm trying to hide the "2022 Prints - coming soon"

Add the following to Store Settings > Advanced > Page Header Code Injection for the store page. Please see per-page code injection.

<style>

  /* hide 2022 prints coming soon */
  
  #categoryNav ul li:nth-child( 3 ) {
  
    display : none;
    
    }
	
  </style>

This is for v7.0 using the Avenue template.

Let us know how it goes.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
52 minutes ago, kirrily said:

Now I am trying to hide the products in this category

There are no product in this category to hide so it's hard give code for items that don't exist.

 

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment

One product has been created but it is hidden. When I make it public it shows up with the rest of the products in the store. I don't want to make products in that category public until a certain time. What is the best way to do this? Thanks 🙂

Link to comment
12 hours ago, kirrily said:

I don't want to make products in that category public until a certain time. What is the best way to do this?

When you create a product you can set a publish schedule.

570002628_ScreenShot2022-07-25at10_40_11AM.png.1211a2ca21a7aaf96e45e2e7d2caea43.png

832316336_ScreenShot2022-07-25at10_40_21AM.png.0b2b35639ef083b9817ce10b30df7097.png

Or you can change a products visibility.

2088588681_ScreenShot2022-07-25at10_41_25AM.png.2feb65638684c3f9d07e277c9e4aeba6.png

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment

Hi again, sorry I probably worded this incorrectly. I would like to make the category "Prints 2022" and it's products not visible on my store page, but accessible via a direct link for the category (or even linking per product would be fine). I have created one product in this category so far, and it is set as "hidden", but I'm hoping there is a way to set it (and the others I will add) as visible, without it showing in my "store" page. i.e. it can only be accessed via a direct link. 

Thanks so much for your help!

Link to comment

I suggest a different strategy instead of using CSS to hide a category. Create a second Store page in the Not Linked area of Pages.

Create your Prints 2022 products in that store. Any that you have created already can be moved to this new store. You can also add a password to the Store page to restrict access to those you give the password.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
  • 3 months later...

Hi,

I've been looking at this and trying to hack it (without any real understanding) to fit my site, but I can't get it to work. I'm at https://ubufoods.com. It's a 7.1 site, is that the issue? What I'm trying to do is create a 'Wholesale' category that won't show up in the main store area. Instead I'd like it to show up as a category page behind a password. Hopefully that makes sense. Thanks so much!

Link to comment
53 minutes ago, AlexMogens said:

Instead I'd like it to show up as a category page behind a password.

Use the technique I describe in my July 25th post earlier in this thread.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

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.