# 仅对已登录用户显示标题 HTML

**URL:** https://meta.discourse.org/t/display-header-html-to-only-logged-in-users/113806
**Category:** Support
**Created:** [2019年四月8日 21:52 UTC](https://meta.discourse.org/t/display-header-html-to-only-logged-in-users/113806 "2019-04-08T21:52:16Z")
**Posts on this page:** 1
**Showing post:** 9

<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: [2019年四月9日 19:55 UTC](https://meta.discourse.org/t/display-header-html-to-only-logged-in-users/113806/9 "2019-04-09T19:55:07Z")

</div>

Check if this method is still valid:

> [@CSS classes for group membership? (For simplified UI mode)](https://meta.discourse.org/t/css-classes-for-group-membership-for-simplified-ui-mode/60838/2):
>
> There might be something that exists in Discourse already - but I personally don’t know of it… Here is some code I wrote a long time ago and it still appears to work… … however there is probably a far better way. It may / may not help you. For a specific username \<script\> if (window.jQuery) { window.jQuery(function ($) { var u = Discourse.User.current(); if (u && (u.username === 'DeanMarkTaylor' || u.username === 'BobTheBuilder')) { // Here is where you could add a C…

---

_[View the full topic](https://meta.discourse.org/t/display-header-html-to-only-logged-in-users/113806)._
