Limit the amount of subcategories on the homepage

Hello,

I’ve been trying to find an solution to his, but with no success.
Is it possible to hide just some of the subcategories on the home page? At the moment all of the subcategories are being displayed under a category, but I would like to display just 8 of them. Is this possible? Not sure if maybe something like this can be done with CSS (not my expertise).
Been going through settings, but I didn’t find anything that can do something like that.

1 Like

Yeah, I reckon you can probably do it.

Here’s an example for Category Boxes (you’ll need to work out the Sub-Categories bit etc, but same concept):

.category.category-box:nth-child(n+3) {
  display: none;
}

Hides all Category boxes after 3rd.

Adapt for your specific use case … (this doesn’t solve the “not the Categories” bit, nor the style of home Category page you may be using).

4 Likes

Thank you a lot!

This is what I used now and it worked:

  .subcategories {
    .subcategory:nth-child(n+9) {
      display: none;
    }
  }
3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.