# 如何将类别描述添加到类别下拉列表中显示？

**URL:** <https://meta.discourse.org/t/how-can-i-add-the-category-descriptions-to-show-in-the-category-dropdowns/209152>\
**Category:** Support\
**Created:** [2021年十一月14日 00:02 UTC](https://meta.discourse.org/t/how-can-i-add-the-category-descriptions-to-show-in-the-category-dropdowns/209152 "2021-11-14T00:02:31Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)\
**Post date:** [2021年十一月16日 14:19 UTC](https://meta.discourse.org/t/how-can-i-add-the-category-descriptions-to-show-in-the-category-dropdowns/209152/6 "2021-11-16T14:19:48Z")

</div>

正如 Daniela 所提到的，我们仅在新用户（信任级别 0）的下拉菜单中显示类别描述，而对其他所有人隐藏。这样做的想法是，普通访客将受益于一次看到更多类别，而描述则不太有用。

您可以通过将以下内容添加到您网站主题的 `head` 部分来覆盖此行为（管理 \> 自定义 \> 主题 \> 编辑 html/css）：

```xml
<script type="text/discourse-plugin" version="0.8">
api.modifyClass("component:category-drop", {
    displayCategoryDescription: true,
});
</script>

```

---

_[View the full topic](https://meta.discourse.org/t/how-can-i-add-the-category-descriptions-to-show-in-the-category-dropdowns/209152)._
