# 如果用户已登录，如何隐藏按钮（SVG 图标）？

**URL:** <https://meta.discourse.org/t/how-to-hide-a-button-svg-icon-if-user-is-logged-in/302514>\
**Category:** Development\
**Created:** [2024年四月4日 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:** 11

<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:** [2024年四月5日 00:15 UTC](https://meta.discourse.org/t/how-to-hide-a-button-svg-icon-if-user-is-logged-in/302514/11 "2024-04-05T00:15:23Z")

</div>

> [@45thj5ej](#):
>
> 所以它必须以某种方式手动添加？

是的，您需要自定义站点的 CSS：

> [@Making custom CSS changes on your site](https://meta.discourse.org/t/make-css-changes-on-your-site/168101#where-do-i-add-my-css-5):
>
> bookmark This guide explains how to make CSS changes on your Discourse site, including an introduction to CSS, where to add CSS in Discourse, and how to find the right selectors using browser inspection tools. person_raising_hand Required user level: Administrator Summary This guide covers: A brief introduction to CSS and key concepts How to add CSS to your Discourse site using theme components Using browser inspection tools to find the right CSS selectors Understanding CSS basics C…

---

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