# Hide some preference sub-tabs under the user profile?

**URL:** https://meta.discourse.org/t/hide-some-preference-sub-tabs-under-the-user-profile/282454
**Category:** Development
**Tags:** css
**Created:** [October 16, 2023, 9:37pm UTC](https://meta.discourse.org/t/hide-some-preference-sub-tabs-under-the-user-profile/282454 "2023-10-16T21:37:32Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [October 17, 2023, 3:24pm UTC](https://meta.discourse.org/t/hide-some-preference-sub-tabs-under-the-user-profile/282454/2 "2023-10-17T15:24:03Z")

</div>

Hi Jeff 🙂

You could first install [CSS Classes for Current User's Groups](https://meta.discourse.org/t/css-classes-for-current-users-groups/226068), then use the added classes to hide these elements with CSS:

```scss
body:not(.staff) {
    .user-nav__preferences-security,
    .user-nav__preferences-emails,
    .user-nav__preferences-tracking,
    .user-nav__preferences-users {
        display: none !important;
    }    
}

```

 ![image](https://global.discourse-cdn.com/meta/original/4X/5/c/8/5c8d103d3eb724d82cbb4ac6527441600548f8c3.png)

Note that with this component, admins don’t have a specific class. It would require additional javascript. Staff means admins and moderators.

Also, users with basic related knowledge can circumvent such client-side modification.

---

_[View the full topic](https://meta.discourse.org/t/hide-some-preference-sub-tabs-under-the-user-profile/282454)._
