# Comment puis-je masquer le bouton Ajouter de la barre latérale

**URL:** https://meta.discourse.org/t/how-can-i-hide-the-add-button-from-sidebar/267390
**Category:** Development
**Tags:** sidebar
**Created:** [Juin 6, 2023, 1: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:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Jm\_Jm](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jm_jm/32/301012_2.png) [@Jm\_Jm](https://meta.discourse.org/u/Jm_Jm)
#### Post date: [Juin 6, 2023, 1:53 UTC](https://meta.discourse.org/t/how-can-i-hide-the-add-button-from-sidebar/267390/1 "2023-06-06T13:53:26Z")

</div>

J’aimerais masquer le bouton “Créer un sujet” dans le menu de la barre, car il prête à confusion, y a-t-il un moyen ?

 ![IMG_20230606_154759](https://global.discourse-cdn.com/meta/original/4X/8/1/1/81111dbcd3809f6c775b000e4e67156ce43af811.jpeg)

---

<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: [Juin 6, 2023, 2:25 UTC](https://meta.discourse.org/t/how-can-i-hide-the-add-button-from-sidebar/267390/2 "2023-06-06T14:25:27Z")

</div>

dans css commun

```sass
[data-section-name="community"] {
  .sidebar-section-header-button {
    display: none;
  }
}

```

---

<div class="post-metadata">

### Author: ![Jm\_Jm](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jm_jm/32/301012_2.png) [@Jm\_Jm](https://meta.discourse.org/u/Jm_Jm)
#### Post date: [Juin 6, 2023, 4:02 UTC](https://meta.discourse.org/t/how-can-i-hide-the-add-button-from-sidebar/267390/3 "2023-06-06T16:02:56Z")

</div>

Merci pour votre réponse, mais j’aimerais le masquer uniquement pour les utilisateurs normaux, car la fonctionnalité + change pour l’administration (+ ne crée plus de sujet mais organise la barre latérale) J’aimerais conserver l’organisation de la barre latérale.

---

<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: [Juin 6, 2023, 9:19 UTC](https://meta.discourse.org/t/how-can-i-hide-the-add-button-from-sidebar/267390/4 "2023-06-06T21:19:14Z")

</div>

Pour le masquer uniquement pour les utilisateurs réguliers, vous pouvez apporter une légère modification au CSS ci-dessus&nbsp;:

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

```

Ainsi, cela ne s’appliquera qu’aux utilisateurs qui ne sont _pas_ du personnel.

Nous avons un tutoriel sur la façon d’apporter ce type de modifications CSS ici&nbsp;: [Making custom CSS changes on your site](https://meta.discourse.org/t/make-css-changes-on-your-site/168101)

> [@Jm\_Jm](#):
>
> parce que cela confond les gens

les gens s’attendent à ce que cela ajoute un élément de barre latérale plutôt qu’à créer un nouveau sujet&nbsp;? ou autre chose&nbsp;?

---

<div class="post-metadata">

### Author: ![Jm\_Jm](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jm_jm/32/301012_2.png) [@Jm\_Jm](https://meta.discourse.org/u/Jm_Jm)
#### Post date: [Juin 7, 2023, 4:47 UTC](https://meta.discourse.org/t/how-can-i-hide-the-add-button-from-sidebar/267390/5 "2023-06-07T04:47:01Z")

</div>

Merci pour votre aide !
