# Hoe verberg ik een knop (SVG-icoon) als de gebruiker is ingelogd?

**URL:** https://meta.discourse.org/t/how-to-hide-a-button-svg-icon-if-user-is-logged-in/302514
**Category:** Development
**Created:** [4 april 2024 om 23:47 UTC](https://meta.discourse.org/t/how-to-hide-a-button-svg-icon-if-user-is-logged-in/302514 "2024-04-04T23:47:48Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![omarfilip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/omarfilip/32/208019_2.png) [@omarfilip](https://meta.discourse.org/u/omarfilip)
#### Post date: [5 april 2024 om 00:09 UTC](https://meta.discourse.org/t/how-to-hide-a-button-svg-icon-if-user-is-logged-in/302514/6 "2024-04-05T00:09:25Z")

</div>

Ah, sorry - you wanted the opposite, so: `not(.anon)`

> [@How to display a banner for visitors only?](https://meta.discourse.org/t/how-to-display-a-banner-for-visitors-only/87800/2):
>
> You can make use of the anon class added to the \<body\> tag. More on this here: The selector in your case would be inverted like so: body:not(.anon) { #banner { display: none; } } Which effectively hides the banner unless the user is logged out.

---

_[View the full topic](https://meta.discourse.org/t/how-to-hide-a-button-svg-icon-if-user-is-logged-in/302514)._
