# Plugin Login to view content (Working)

**URL:** <https://meta.discourse.org/t/plugin-login-to-view-content-working/126196>\
**Category:** Development\
**Created:** [August 19, 2019, 4:58pm UTC](https://meta.discourse.org/t/plugin-login-to-view-content-working/126196 "2019-08-19T16:58:24Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)\
**Post date:** [August 19, 2019, 5:22pm UTC](https://meta.discourse.org/t/plugin-login-to-view-content-working/126196/2 "2019-08-19T17:22:37Z")

</div>

When no user is logged in, the `html` element has a class called `anon`.  
So prefixing any CSS selector with `html.anon` will do the trick.

---

_[View the full topic](https://meta.discourse.org/t/plugin-login-to-view-content-working/126196)._
