# 能否从主页移除 Feedback 类别，但不在汉堡菜单中移除？

**URL:** <https://meta.discourse.org/t/is-there-a-way-to-remove-the-feedback-category-from-homepage-but-not-from-hamburger-menu/296418>\
**Category:** Support\
**Tags:** css\
**Created:** [2024年二月23日 02:20 UTC](https://meta.discourse.org/t/is-there-a-way-to-remove-the-feedback-category-from-homepage-but-not-from-hamburger-menu/296418 "2024-02-23T02:20:08Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![HisFocus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hisfocus/32/346278_2.png) [@HisFocus](https://meta.discourse.org/u/HisFocus)\
**Post date:** [2024年二月23日 02:20 UTC](https://meta.discourse.org/t/is-there-a-way-to-remove-the-feedback-category-from-homepage-but-not-from-hamburger-menu/296418/1 "2024-02-23T02:20:08Z")

</div>

是否可以从主页（但不是从汉堡菜单）中删除“反馈”类别（或任何其他类别）？我不想删除该类别，只是不想在主页上显示该类别。

非常感谢您的帮助。提前致谢。

---

<div class="post-metadata">

**Author:** ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)\
**Post date:** [2024年二月23日 02:55 UTC](https://meta.discourse.org/t/is-there-a-way-to-remove-the-feedback-category-from-homepage-but-not-from-hamburger-menu/296418/2 "2024-02-23T02:55:03Z")

</div>

您可以使用两个管理员设置来执行此操作：“默认导航菜单类别”（导航侧边栏菜单中的列表）和“默认类别静音”（将在主类别页面上静音）。

但请记住，用户可以在其首选项中更改自己的导航侧边栏菜单类别。

---

<div class="post-metadata">

**Author:** ![HisFocus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hisfocus/32/346278_2.png) [@HisFocus](https://meta.discourse.org/u/HisFocus)\
**Post date:** [2024年二月23日 03:14 UTC](https://meta.discourse.org/t/is-there-a-way-to-remove-the-feedback-category-from-homepage-but-not-from-hamburger-menu/296418/3 "2024-02-23T03:14:05Z")

</div>

谢谢您，@Lilly。但是，应用这些设置后，只有“反馈”类别被静音了（变淡但仍显示）。我的网站不使用侧边菜单导航。

 ![Screenshot 2024-02-22 220855](https://global.discourse-cdn.com/meta/original/4X/2/b/b/2bb1cb8797cbbdf655c6febadb0c561f2251e89a.png)

我的屏幕顶部确实有一个“文档”链接，这是一个提供“文档”的组件，格式完全不同（我喜欢这种格式的文档），但我只是不想让“反馈”和“文档”的大按钮显示在主页上。您能想到有什么方法可以阻止它们显示吗？再次强调，我已经实施了您的建议，但它们不起作用。我认为大的“文档”按钮仍然显示是因为它有子类别。即使我删除了在主页上像这样显示类别的组件，它们仍然会以不同的布局显示。

如果您有任何建议或意见，我将不胜感激，@Lilly。

---

<div class="post-metadata">

**Author:** ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)\
**Post date:** [2024年二月23日 03:17 UTC](https://meta.discourse.org/t/is-there-a-way-to-remove-the-feedback-category-from-homepage-but-not-from-hamburger-menu/296418/4 "2024-02-23T03:17:43Z")

</div>

你是否尝试过以非管理员用户身份进行操作？

---

<div class="post-metadata">

**Author:** ![HisFocus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hisfocus/32/346278_2.png) [@HisFocus](https://meta.discourse.org/u/HisFocus)\
**Post date:** [2024年二月23日 03:27 UTC](https://meta.discourse.org/t/is-there-a-way-to-remove-the-feedback-category-from-homepage-but-not-from-hamburger-menu/296418/5 "2024-02-23T03:27:04Z")

</div>

是的，我有一个 test.account 用户，并且作为管理员，我点击了该用户的“模拟”按钮，您看到的截图就是模拟 test.account 用户时的截图。

---

<div class="post-metadata">

**Author:** ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)\
**Post date:** [2024年二月23日 03:35 UTC](https://meta.discourse.org/t/is-there-a-way-to-remove-the-feedback-category-from-homepage-but-not-from-hamburger-menu/296418/6 "2024-02-23T03:35:24Z")

</div>

嗯，看起来您正在使用 [Modern Category + Group Boxes](https://github.com/discourse/discourse-minimal-category-boxes)，这是 [Air 主题](https://meta.discourse.org/t/discourse-air-theme/197703) 的一部分 - 我不确定，但可能存在影响您所见情况的主题/主题组件设置。🤔

---

<div class="post-metadata">

**Author:** ![HisFocus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hisfocus/32/346278_2.png) [@HisFocus](https://meta.discourse.org/u/HisFocus)\
**Post date:** [2024年二月23日 03:42 UTC](https://meta.discourse.org/t/is-there-a-way-to-remove-the-feedback-category-from-homepage-but-not-from-hamburger-menu/296418/7 "2024-02-23T03:42:09Z")

</div>

我正在使用“Modern Category + Group Boxes”组件，并使用了“Material Design Theme”。_可能_存在一个主题组件问题，阻止我删除该类别，这就是我之前删除“Modern Category + Group Boxes”组件的原因，但类别仍然出现在主屏幕上。

---

<div class="post-metadata">

**Author:** ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)\
**Post date:** [2024年二月23日 04:26 UTC](https://meta.discourse.org/t/is-there-a-way-to-remove-the-feedback-category-from-homepage-but-not-from-hamburger-menu/296418/8 "2024-02-23T04:26:08Z")

</div>

还有一个分类隐藏器 #Customization > Theme component

> [@类别隐藏主题组件](https://meta.discourse.org/t/category-hider-theme-component/181299):
>
> 大家好，我创建了一个简单的主题组件。希望这对大家有所帮助！ eyeglasses 概述 这是一个主题组件，允许您从汉堡菜单或分类框中隐藏特定的分类。 thinking 为什么需要这个组件？ 如果您的 Discourse 网站拥有大量分类，并且您希望隐藏部分分类，使其不显示在菜单栏或主页上，那么这个组件将非常有用。 framed_picture 截图 汉堡菜单预览：之前 –\u003e 之后 gear 设置菜单： 有关如何使用此主题组件的更多详细信息以及安装说明，请访问该组件的 [GitHub 仓库。](https://github.com/keegangeorge/discourse-hide-categories)eyeglasses预览 [https://theme-creator.discourse.org/theme/keegan/category-hider](https://theme-creator.discourse.org/theme/keegan/category-hider)octopus仓库 [在 GitHub 上查看](https://github.com/keegangeorge/discourse-hide-categories)question安装指南 [如何安装主题或主题组件](https://meta.discourse.org/t/how-do-i-install-a-theme-or-theme-component/63682)open_bookDiscourse 主题新手？ [Discourse 主题使用入门指南](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966)

---

<div class="post-metadata">

**Author:** ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)\
**Post date:** [2024年二月23日 04:31 UTC](https://meta.discourse.org/t/is-there-a-way-to-remove-the-feedback-category-from-homepage-but-not-from-hamburger-menu/296418/9 "2024-02-23T04:31:21Z")

</div>

是的，我认为这应该能满足他的用例 👍 好主意。

---

<div class="post-metadata">

**Author:** ![HisFocus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hisfocus/32/346278_2.png) [@HisFocus](https://meta.discourse.org/u/HisFocus)\
**Post date:** [2024年二月23日 05:00 UTC](https://meta.discourse.org/t/is-there-a-way-to-remove-the-feedback-category-from-homepage-but-not-from-hamburger-menu/296418/10 "2024-02-23T05:00:25Z")

</div>

我非常感谢您的帮助，但此组件根本不起作用。无论输入什么设置（甚至使用的“主题”……我甚至尝试了“浅色”主题），汉堡菜单或主页上显示的类别框都没有任何变化。

有人能验证此组件是否有效吗？

---

<div class="post-metadata">

**Author:** ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)\
**Post date:** [2024年二月23日 05:16 UTC](https://meta.discourse.org/t/is-there-a-way-to-remove-the-feedback-category-from-homepage-but-not-from-hamburger-menu/296418/11 "2024-02-23T05:16:36Z")

</div>

我已将其设置为正常工作，但我没有尝试使用现代类别 + 组件。您可能与该组件存在冲突，并且可能需要诉诸 CSS 或创建自定义主题组件来隐藏它们。

---

<div class="post-metadata">

**Author:** ![HisFocus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hisfocus/32/346278_2.png) [@HisFocus](https://meta.discourse.org/u/HisFocus)\
**Post date:** [2024年二月23日 05:22 UTC](https://meta.discourse.org/t/is-there-a-way-to-remove-the-feedback-category-from-homepage-but-not-from-hamburger-menu/296418/12 "2024-02-23T05:22:33Z")

</div>

我尝试过使用和不使用“Modern Category + Boxes”组件，但都没有成功。我想我需要重新考虑我的方法。我非常喜欢屏幕顶部的“DOCS”链接，并且只希望人们能从该链接访问文档。我正在使用“Material Design Theme”，真的不知道接下来该怎么做。 at this point，我不再寻求让“Category Hider Component”为我工作，我想我只是在寻找另一个解决方案或选项。

---

<div class="post-metadata">

**Author:** ![tynaut](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tynaut/32/276689_2.png) [@tynaut](https://meta.discourse.org/u/tynaut)\
**Post date:** [2024年二月23日 05:24 UTC](https://meta.discourse.org/t/is-there-a-way-to-remove-the-feedback-category-from-homepage-but-not-from-hamburger-menu/296418/13 "2024-02-23T05:24:58Z")

</div>

默认情况下，Modern Category + Group Boxes 会显示所有类别。  
如果您在主题设置中指定了至少一个类别，它将仅显示选定的类别。如果您指定了任何类别，它还将添加一个标题。可以通过将此标题设置为空字符串（“”）来删除它。

在此示例中，我仅添加了“videos”：

 ![CleanShot 2024-02-22 at 23.19.50@2x](https://global.discourse-cdn.com/meta/original/4X/6/b/e/6bef83e26ab3aa6d485a8c20e5588fbc4f336a13.png)

主题组件的设置位于右上角的个人资料图标 → 个人资料 → 首选项 → 管理员 → 自定义 → 组件 → Modern Category + Group Boxes

 ![CleanShot 2024-02-22 at 23.21.22@2x](https://global.discourse-cdn.com/meta/original/4X/2/9/a/29a07c95b7ca67e768005e6355a67bd1793e1870.png)

 ![CleanShot 2024-02-22 at 23.23.05@2x](https://global.discourse-cdn.com/meta/original/4X/9/7/c/97c5747d79b7ac37784281660721ee603bf0db04.png)

如果您希望通过 CSS 隐藏类别，可以在主题组件中使用类似以下的代码。将“videos”替换为您要隐藏的类别的名称：

```plaintext
.category-box-videos {
    display: none !important;
}

```

要创建主题组件，请转到管理员设置中的相同组件位置，点击“安装” → 创建新组件 → 为组件命名并点击创建。然后您可以点击“编辑 CSS/HTML”。确保在“在此主题上包含组件”下选择您的活动主题的名称。

---

<div class="post-metadata">

**Author:** ![HisFocus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hisfocus/32/346278_2.png) [@HisFocus](https://meta.discourse.org/u/HisFocus)\
**Post date:** [2024年二月23日 05:35 UTC](https://meta.discourse.org/t/is-there-a-way-to-remove-the-feedback-category-from-homepage-but-not-from-hamburger-menu/296418/14 "2024-02-23T05:35:54Z")

</div>

太爱 CSS 了！这招奏效了！非常感谢！

```plaintext
.category-box-documents {
    display: none !important;
}

.category-box-site-feedback {
    display: none !important;
}

```

---

<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:** [2024年三月24日 05:36 UTC](https://meta.discourse.org/t/is-there-a-way-to-remove-the-feedback-category-from-homepage-but-not-from-hamburger-menu/296418/15 "2024-03-24T05:36:12Z")

</div>

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