# 如何隐藏侧边栏的添加按钮

**URL:** https://meta.discourse.org/t/how-can-i-hide-the-add-button-from-sidebar/267390
**Category:** Development
**Tags:** sidebar
**Created:** [2023年六月6日 13:53 UTC](https://meta.discourse.org/t/how-can-i-hide-the-add-button-from-sidebar/267390 "2023-06-06T13:53:26Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [2023年六月6日 21:19 UTC](https://meta.discourse.org/t/how-can-i-hide-the-add-button-from-sidebar/267390/4 "2023-06-06T21:19:14Z")

</div>

要仅对普通用户隐藏它，您可以对上面的 CSS 进行微调：

```scss
body:not(.staff) {
  [data-section-name="community"] {
    .sidebar-section-header-button {
      display: none;
    }
  }
}

```

这样，它将仅应用于_非_员工用户。

我们有一个关于如何进行此类 CSS 更改的教程：[Making custom CSS changes on your site](https://meta.discourse.org/t/make-css-changes-on-your-site/168101)

> [@Jm\_Jm](#):
>
> 因为它会使人们感到困惑

人们是否期望它添加一个侧边栏项目而不是创建一个新主题？还是其他什么？

---

_[View the full topic](https://meta.discourse.org/t/how-can-i-hide-the-add-button-from-sidebar/267390)._
