# Remove Personal Chat items

**URL:** https://meta.discourse.org/t/remove-personal-chat-items/263676
**Category:** Development
**Tags:** sidebar
**Created:** [May 3, 2023, 1:24pm UTC](https://meta.discourse.org/t/remove-personal-chat-items/263676 "2023-05-03T13:24:45Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![JBM](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jbm/32/279154_2.png) [@JBM](https://meta.discourse.org/u/JBM)
#### Post date: [May 3, 2023, 1:24pm UTC](https://meta.discourse.org/t/remove-personal-chat-items/263676/1 "2023-05-03T13:24:45Z")

</div>

Hi, I am trying to figure out how to build a very minimal sidebar experience for a client, using only a few lines filled with [Custom Hidebar Section Topic](https://meta.discourse.org/t/custom-sidebar-sections-being-tested-on-meta/255303); and do not show anything else.

Thanks to @Lilly:

> [@How to delete some sections from the sidebar](https://meta.discourse.org/t/how-to-delete-some-sections-from-the-sidebar/261887):
>
> I made new sections of my sidebar menu via the but the old sections was showing up too, and it confuses my members, how do I delete the old ones?

i could do this to hide the `Community`, `tags`, `messages` and `chat channels` (yeah, not a very lean piece of code but it’s ok).

```plaintext
.sidebar-section[data-section-name="community"] {
  display: none
}
.sidebar-section[data-section-name="tags"] {
  display: none
}
.sidebar-section[data-section-name="messages"] {
  display: none
}
.sidebar-section[data-section-name="chat-channels"] {
  display: none
}

```

  

I would also like to also hide the `Personal chats` items, but i don’t find the corresponding `data-section-name`.

  

I hope this was not solved somewhere else… i have tried to make a tour of the support litterature, especially the very good piece of post of @shyguy, without success (at least for a rookie like me).

> [@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 …

  

Tks a lot for any piece of help or advice!!

  

* * *

PS: i am JB and this is my first post on this forum 🎉 (after a couple of years of presence, and especially on the last 4/5 months). Thanks for this wonderfull community and software!

---

<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: [May 3, 2023, 4:19pm UTC](https://meta.discourse.org/t/remove-personal-chat-items/263676/2 "2023-05-03T16:19:59Z")

</div>

hi @JBM. welcome to Meta. 👋

does this work?

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

```

are you just wanting to hide chat stuff from the sidebar or are you wanting to turn off chat altogether? you can disable chat plugin in `admin-plugins-chat-settings`.

---

<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: [May 3, 2023, 4:47pm UTC](https://meta.discourse.org/t/remove-personal-chat-items/263676/3 "2023-05-03T16:47:31Z")

</div>

also i think you can write all that code something more compact like this:

```scss
.sidebar-section[data-section-name="community"], .sidebar-section[data-section-name="tags"], .sidebar-section[data-section-name="messages"], .sidebar-section[data-section-name="chat-channels"], .sidebar-section[data-section-name="chat-dms"] {display: none}

```

---

<div class="post-metadata">

### Author: ![JBM](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jbm/32/279154_2.png) [@JBM](https://meta.discourse.org/u/JBM)
#### Post date: [May 3, 2023, 5:10pm UTC](https://meta.discourse.org/t/remove-personal-chat-items/263676/4 "2023-05-03T17:10:19Z")

</div>

Terrific 🤩!

This is exactly what i was looking for (inedeed, i just want to hide the group & personal chat from the minimalist sidebar and still keep it visible on the top header only)!

Tks for your prompt help (& your warm welcome!).

---

<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: [June 2, 2023, 5:10pm UTC](https://meta.discourse.org/t/remove-personal-chat-items/263676/5 "2023-06-02T17:10:38Z")

</div>

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