Jump to content

Hide Specific Category Filter from Products/Shop Feed

Go to solution Solved by tuanphan,

Recommended Posts

  • Replies 9
  • Views 1.5k
  • Created
  • Last Reply

Top Posters In This Topic

Posted

Hi Katie,
You can hide it with CSS. Try inserting this CSS code in the Page Header Code Injection.

<style>
/*Hide Free Resources*/
.products.collection-content-wrapper .nested-category-breadcrumb-list-item:nth-child(2){
   display: none !important;
}
</style>




Warning: This CSS code is using  nth-child(2) which since 'Free Resources' is the 2nd option in the category list so if you're adding more categories in the future, make sure to update nth-child(2) to the new order of 'Free Resources' in the category list example: nth-child(4). 

We offer solutions for filtering, multi-location map display, adding tables, raising summary block limit and more at Squarewebsites  🔳.

Posted

Hey! Thank you so much for the code. Unfortunately, it didn't seem to do anything on the site. I also tried putting it in Custom CSS from the dashboard and it didn't work there either.

Posted
On 6/19/2024 at 11:49 PM, katiependergast said:

Hey! Thank you so much for the code. Unfortunately, it didn't seem to do anything on the site. I also tried putting it in Custom CSS from the dashboard and it didn't work there either.

Remove Category on Left only or Remove Category on Left + Remove products belong that Category?

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!)

  • Solution
Posted
On 6/22/2024 at 12:34 AM, katiependergast said:

Remove category on left and remove products that belong that category, please!

Try this code to Website Tools (under Not Linked) > Code Injection > Footer

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
  $(document).ready(function(){
    $('html:has(link[rel="canonical"][href="https://www.miclovesme.com/shop"]) .product-price:contains("$0.00")').addClass('hide-free');
});
</script>
<style>
  div.grid-item:has(.hide-free) {
    display: none !important;
}
  li.category-item:has([href="/shop/free-resources"]) {
    display: none;
}
</style>

 

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!)

  • 1 month later...
Posted
On 7/26/2024 at 2:34 AM, ChristinaDean said:

@tuanphan I'd also love help removing "ALL" and "Biscuits" from the overall store. I will be adding more categories soon, so would love the ability to hide them at the top of the main store page. We just want it to say "SHOP" without categories visible. 

https://www.stockprovisions.com/shop

Screenshot 2024-07-25 at 12.29.09 PM.png

I see you solved with this CSS code?

#categoryNav {
    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!)

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.