# הסתר תגיות ותגים מהמבורגר רק לאורחים

**URL:** https://meta.discourse.org/t/hide-tags-and-badges-from-hamburger-only-for-guests/231135
**Category:** Support
**Created:** [26 ביוני,‏ 2022,‏ 6:27pm UTC](https://meta.discourse.org/t/hide-tags-and-badges-from-hamburger-only-for-guests/231135 "2022-06-26T18:27:32Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Himanshu\_Singh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/himanshu_singh/32/216438_2.png) [@Himanshu\_Singh](https://meta.discourse.org/u/Himanshu_Singh)
#### Post date: [26 ביוני,‏ 2022,‏ 6:27pm UTC](https://meta.discourse.org/t/hide-tags-and-badges-from-hamburger-only-for-guests/231135/1 "2022-06-26T18:27:32Z")

</div>

I want the logged out user interface as simple as possible so I was wondering if I could hide tags and badges from the hamburger Menu only for guests.

I know this can be done easily with CSS from this post -

> [@How can hide the 'Latest', 'Top', 'Badges' and 'Categories' in the hamburger menu?](https://meta.discourse.org/t/how-can-hide-the-latest-top-badges-and-categories-in-the-hamburger-menu/177740):
>
> We want to keep the menu simple to our users. We would like to hide the ‘Latest’, ‘Top’, ‘Badges’ and ‘Categories’ in hamburger menu. Our web: [https://amzdis.com](https://amzdis.com) (Amazon Discount Code) How can hide the ‘Latest’, ‘Top’, ‘Badges’ and ‘Categories’ in the hamburger menu?

But how do I check for the condition that user is a guest and then hide menu items? I probably need to call a function to check this ( just like WordPress) but I have no idea how that would work in Discourse. Can someone please help?

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [26 ביוני,‏ 2022,‏ 6:34pm UTC](https://meta.discourse.org/t/hide-tags-and-badges-from-hamburger-only-for-guests/231135/2 "2022-06-26T18:34:15Z")

</div>

Anonymous users have an `anon` class you can target, so you could use something like:

```plaintext
.anon {
.hamburger-panel .menu-panel {
  a.latest-topics-link,
  a.top-topics-link,
  a.badge-link,
  li a.categories-link { 
    display: none
   }
  }
} 

```

(I just added the `anon` class to the example from the other topic. You would need to tweak it to hide the specific things you wanted)

---

<div class="post-metadata">

### Author: ![Himanshu\_Singh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/himanshu_singh/32/216438_2.png) [@Himanshu\_Singh](https://meta.discourse.org/u/Himanshu_Singh)
#### Post date: [27 ביוני,‏ 2022,‏ 5:31pm UTC](https://meta.discourse.org/t/hide-tags-and-badges-from-hamburger-only-for-guests/231135/3 "2022-06-27T17:31:49Z")

</div>

> [@JammyDodger](#):
>
> ```plaintext
> .anon {
> .hamburger-panel .menu-panel {
> a.latest-topics-link,
> a.top-topics-link,
> a.badge-link,
> li a.categories-link { 
> display: none
> }
> }
> } 
> 
> ```

This worked like a charm. Thank you! Only thing left to hide is the tags link but it does not seem to have it’s own class. How do I target it? With widget-link class it hides the About, FAQ and Mobile View links.

 ![](https://global.discourse-cdn.com/meta/original/4X/6/3/6/636cb048d3f8f6fb3e8df8b281e9e7e50c2a81a7.png)

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [27 ביוני,‏ 2022,‏ 6:23pm UTC](https://meta.discourse.org/t/hide-tags-and-badges-from-hamburger-only-for-guests/231135/4 "2022-06-27T18:23:54Z")

</div>

This one seems promising:

> [@Removing "Tags" From Hamburger Menu with CSS](https://meta.discourse.org/t/removing-tags-from-hamburger-menu-with-css/160196/2):
>
> .menu-panel li a.widget-link[href="/tags"] { display: none; }

---

<div class="post-metadata">

### Author: ![Himanshu\_Singh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/himanshu_singh/32/216438_2.png) [@Himanshu\_Singh](https://meta.discourse.org/u/Himanshu_Singh)
#### Post date: [27 ביוני,‏ 2022,‏ 6:52pm UTC](https://meta.discourse.org/t/hide-tags-and-badges-from-hamburger-only-for-guests/231135/5 "2022-06-27T18:52:27Z")

</div>

[quote=“Removing “Tags” From Hamburger Menu with CSS, post:2, topic:160196”]  
.menu-panel li a.widget-link[href=“/tags”] { display: none; }  
[/quote]

Perfect. This is the final code that worked. I also hide the separator bar. Thank Jammy!

```plaintext
/*hide tags and badges link from hamburger menu for guests */
.anon {
.hamburger-panel .menu-panel {
  a.latest-topics-link,
  a.top-topics-link,
  a.badge-link,
  li a.widget-link[href="/tags"],
  .menu-container-general-links
    { 
    display: none
   }
  }
}

```

---

<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: [27 ביולי,‏ 2022,‏ 6:53pm UTC](https://meta.discourse.org/t/hide-tags-and-badges-from-hamburger-only-for-guests/231135/6 "2022-07-27T18:53:27Z")

</div>

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