How can I add the category descriptions to show in the category dropdowns?

AI-generated summary

spdegabrielle asked how to display category descriptions in the category dropdown, noting that while descriptions appear in category posts, they don’t show in the dropdown as they do on other Discourse sites. They also inquired about pinning description topics by default, though later retracted that question spdegabrielle. dax and awesomerobot explained that category descriptions in the dropdown are intentionally shown only to new users (Trust Level 0) to help them learn the site structure, and are hidden for users at Trust Level 1 or higher to maximize visible categories. However, awesomerobot provided a workaround: adding a script to the site’s theme head section to force descriptions to always display:

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

This customization overrides the default behavior and ensures category descriptions remain visible to all users.

Hi,

My categories have their description post,

but the first line is not populating the category dropdown:

I would like the description to appear as it does on other Discourse servers:

any advice is appreciated.

bw

Stephen

PS: can the description topics be pinned to the top by default ? - I’ve noticed that once I’ve visited a category - if I fail to pin it myself it disappears never to be found again. I’d really like it to be pinned so my users can see it.

Please ignore the PS. I’m still learning and now I can’t remove it

The description in the dropdown is shown only for new users at TL0 that need to learn how the site is structured.

The description will be automatically hidden when a user reaches TL1.

As Daniela mentioned, we only show the category description in the dropdown for new users (trust level 0) and it’s hidden for everyone else. The thought is that regular visitors will benefit from seeing more categories at once and the descriptions are less useful.

You can override this behavior by adding this to the head section of your site’s theme (admin > customize > themes > edit html/css):

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