# How to delete some sections from the sidebar

**URL:** https://meta.discourse.org/t/how-to-delete-some-sections-from-the-sidebar/261887
**Category:** Support
**Created:** [April 16, 2023, 10:35pm UTC](https://meta.discourse.org/t/how-to-delete-some-sections-from-the-sidebar/261887 "2023-04-16T22:35:32Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![danielabc](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@danielabc](https://meta.discourse.org/u/danielabc)
#### Post date: [April 16, 2023, 10:35pm UTC](https://meta.discourse.org/t/how-to-delete-some-sections-from-the-sidebar/261887/1 "2023-04-16T22:35:33Z")

</div>

I made new sections of my sidebar menu via the

> [@Custom sidebar sections being tested on meta](https://meta.discourse.org/t/custom-sidebar-sections-being-tested-on-meta/255303/85):
>
> Oh, hmm.. since chat is a plugin, it’s likely injected in some other way and uses one of the strings you’ll find if you just search for “chat” – but I’m not sure which one it is. Will have to track it down.

but the old sections was showing up too, and it confuses my members, how do I delete the old ones?

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [April 16, 2023, 10:55pm UTC](https://meta.discourse.org/t/how-to-delete-some-sections-from-the-sidebar/261887/2 "2023-04-16T22:55:12Z")

</div>

which old sections? does something like this work?

COMMON CSS

```scss
.sidebar-section[data-section-name="categories"] {
  display: none
}

```

also there is this:

> [@sidebarMod: Add/Remove Sidebar Links and Sections](https://meta.discourse.org/t/sidebarmod-add-remove-sidebar-links-and-sections/261279):
>
> [sidebarMod](https://gist.github.com/ftc2/c2e23fab9cfd3ff14972972f459e9c4e) here’s [my script](https://gist.github.com/ftc2/c2e23fab9cfd3ff14972972f459e9c4e) for modding the sidebar (first mentioned in the [custom sidebar sections topic](https://meta.discourse.org/t/custom-sidebar-sections-being-tested-on-meta/255303)). it uses promises and MutationObserver to watch the sidebar for changes (e.g. from expanding or collapsing) and add/remove stuff in a performant way. i think i made it flexible enough for most use cases. you can add links (positioned by appending, prepending, or inserting before/after existing links), remove sections, remove links, and even remove ⋮More. it’s even possible to change the …

---

<div class="post-metadata">

### Author: ![shyguy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/shyguy/32/295079_2.png) [@shyguy](https://meta.discourse.org/u/shyguy)
#### Post date: [April 16, 2023, 11:10pm UTC](https://meta.discourse.org/t/how-to-delete-some-sections-from-the-sidebar/261887/3 "2023-04-16T23:10:30Z")

</div>

can’t you just delete them the same way you made them?

or are you saying that publicly published sidebar sections (made by admins) persist once users start interacting with them in some way maybe and can’t be simply removed for everyone in that case?

---

<div class="post-metadata">

### Author: ![danielabc](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@danielabc](https://meta.discourse.org/u/danielabc)
#### Post date: [April 17, 2023, 1:12am UTC](https://meta.discourse.org/t/how-to-delete-some-sections-from-the-sidebar/261887/4 "2023-04-17T01:12:17Z")

</div>

it worked here, thanks a lot for showing me

---

<div class="post-metadata">

### Author: ![danielabc](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@danielabc](https://meta.discourse.org/u/danielabc)
#### Post date: [April 17, 2023, 1:13am UTC](https://meta.discourse.org/t/how-to-delete-some-sections-from-the-sidebar/261887/5 "2023-04-17T01:13:34Z")

</div>

are the sessions that already exist (which already comes in the default discourse) I can’t change them or delete them, but now with the CSS code I can

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [April 17, 2023, 1:19am UTC](https://meta.discourse.org/t/how-to-delete-some-sections-from-the-sidebar/261887/6 "2023-04-17T01:19:38Z")

</div>

so glad it worked. if it’s not obvious, you should be able to substitute the section name for “categories” to to hide other sections, i should have mentioned that actually. i just wasn’t sure what you wanted to hide specifically.

---

<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: [May 17, 2023, 1:20am UTC](https://meta.discourse.org/t/how-to-delete-some-sections-from-the-sidebar/261887/7 "2023-05-17T01:20:05Z")

</div>

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