# Hiding specific sub-category from Hamburger-Menu

**URL:** https://meta.discourse.org/t/hiding-specific-sub-category-from-hamburger-menu/58929
**Category:** Support
**Created:** [12.Март.2017 15:39:40 UTC](https://meta.discourse.org/t/hiding-specific-sub-category-from-hamburger-menu/58929 "2017-03-12T15:39:40Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Lutz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lutz/32/65103_2.png) [@Lutz](https://meta.discourse.org/u/Lutz)
#### Post date: [12.Март.2017 15:39:40 UTC](https://meta.discourse.org/t/hiding-specific-sub-category-from-hamburger-menu/58929/1 "2017-03-12T15:39:40Z")

</div>

I want to hide a specific Subcategory from the Hamburger Menu. Not all Subcategories from this Main-Category, only one. With this CSS I can select the link, but not the “li” element.

```plaintext
.hamburger-panel li.category-link a.badge-wrapper.box[[href="/c/mycategory/mysubcategory"] {
	display: none;
}
```

I need to get the li.category-link, but no idea how. Any ideas?

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [12.Март.2017 21:07:15 UTC](https://meta.discourse.org/t/hiding-specific-sub-category-from-hamburger-menu/58929/2 "2017-03-12T21:07:15Z")

</div>

If you want to target a particular `<li>` try using nth-child

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [12.Март.2017 21:25:00 UTC](https://meta.discourse.org/t/hiding-specific-sub-category-from-hamburger-menu/58929/3 "2017-03-12T21:25:00Z")

</div>

Except that will be a moving target if you have some categories only available to certain groups.

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [13.Март.2017 12:36:26 UTC](https://meta.discourse.org/t/hiding-specific-sub-category-from-hamburger-menu/58929/4 "2017-03-13T12:36:26Z")

</div>

Targetting the `li` element is now possible with  
[https://github.com/discourse/discourse/pull/4749](https://github.com/discourse/discourse/pull/4749)

Using

```plaintext
.hamburger-panel li.category-link.category-mycategory-mysubcategory {
	display: none;
}

```

---

<div class="post-metadata">

### Author: ![Lutz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lutz/32/65103_2.png) [@Lutz](https://meta.discourse.org/u/Lutz)
#### Post date: [13.Март.2017 19:41:46 UTC](https://meta.discourse.org/t/hiding-specific-sub-category-from-hamburger-menu/58929/5 "2017-03-13T19:41:46Z")

</div>

Wow thats great , thank you!

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [14.Март.2017 21:43:06 UTC](https://meta.discourse.org/t/hiding-specific-sub-category-from-hamburger-menu/58929/6 "2017-03-14T21:43:06Z")

</div>

This is now merged, see prior post for how to hide a specific subcategory.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [13.Май.2019 22:55:55 UTC](https://meta.discourse.org/t/hiding-specific-sub-category-from-hamburger-menu/58929/7 "2019-05-13T22:55:55Z")

</div>



---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [12.Июнь.2019 22:55:55 UTC](https://meta.discourse.org/t/hiding-specific-sub-category-from-hamburger-menu/58929/8 "2019-06-12T22:55:55Z")

</div>

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