Hide Muted Categories

:discourse2: Summary Hide Muted Categories hides muted categories from the category list.
:hammer_and_wrench: Repository Link https://github.com/discourse/discourse-hide-muted-categories
:open_book: New to Discourse Themes? Beginner’s guide to using Discourse Themes

Install this theme component

Features

Under normal circumstances, muted categories are shown in the category list to improve discoverability, particularly on sites with many categories muted by default. This theme component will provide the opposite behaviour and hide all muted categories from the category list.


:discourse2: Hosted by us? Theme components are available to use on our Standard, Business, and Enterprise plans.

Last edited by @JammyDodger 2024-06-12T22:56:11Z

Check documentPerform check on document:
26 « J'aime »

Hi @david, do you know of any solutions that would allow hiding specific sub-categories from appearing on the /categories page, but still allowing topics to show up in latest?

I have several categories with a larger amount of sub-categories, and I’d like to hide those since they take up a lot of visual space.

2 « J'aime »

Yes you can do something using css there you should have elements to target

4 « J'aime »

I did find this: .category-list .subcategories { which I can hide, but it applies to all categories on the home page. Is there a way to declare only specific categories and hide only those sub-categories within them?

You would target the href of the link. A bit hacky but it works.

3 « J'aime »

Hi Sam,

This works to remove the subcategory name, but not other elements related to it. I found that for new topics, the ___ new indicator still appears like in the screenshot below.

Screen Shot 2020-06-16 at 6.12.14 PM

1 « J'aime »

Ah sorry, jumped the gun on this. It looks like the URL string /l/new is appended to each category URL, so those can be isolated and hidden by targeting hrefs as well.

1 « J'aime »

Have you found a new solution to hide part of sub categories?

I have hundreds of sub-categories and only wanted the first 20 most active ones. Is there any way?

1 « J'aime »

Do you really need so many categories there? Tags would be more flexible. It’s Time We Talked About Tags

2 « J'aime »

I have seen this exact usage previously, it is always super tricky to fit in geographic buckets of topics to our topic structure, every solution is a bit of a compromise, short of a geo aware plugin

All topics in America
All topics in USA
All topics in California
All topics in Sonoma county
All topics in Santa Rosa

2 « J'aime »

I’m looking for a solution with tags, because in the end I have to manage 8000 cities, and in any case there will also be 8000 natural tags. Do you think 20k tags are supported?

20k tags will work fine, we support very large numbers of tags

Tanks you @sam
I will follow your advice, now I see how I can massively move posts into macro categories and then assign geographic tags

How can I clear categories in bulk via API?

There isn’t an api endpoint to bulk clear out categories. You will have to delete all the topics first and then you should be able to delete the category. If you have console access there are some rake commands that can help with this.

2 « J'aime »

I seem to have the opposite problem, even though I’m on 2.7.0.beta3. Muted categories aren’t appearing on the Categories page, but I would prefer to have this new default behavior.

Avec les versions réelles de Discourse, les catégories masquées n’apparaissent plus sur la page des catégories (elles sont regroupées dans un groupe caché rétractable en bas de la page des catégories).

Je cherche également un moyen d’afficher les catégories masquées à leur place d’origine sur la page des catégories (l’inverse de ce que ce plugin réalisait).
Vos équipes ont-elles pu trouver une solution ?
Merci !

1 « J'aime »

Avec l’implémentation actuelle de Discourse, les catégories masquées s’affichent dans un en-tête/regroupement distinct appelé Catégories masquées.

D’après ce que je comprends, ce thème masquera complètement toutes les catégories masquées de la liste des catégories.

Existe-t-il un moyen d’afficher les catégories masquées comme n’importe quelle autre catégorie régulière (sans les regrouper ou les masquer) dans la liste des catégories ?

Salut, j’utilise Discourse version 3.2.0.beta4-dev et ce composant ne masque pas la catégorie de la page des catégories ? Que puis-je faire pour masquer la catégorie ?

J’ai vérifié le code GitHub pour voir qu’il s’agissait juste de CSS et je l’ai appliqué aux custom-category-boxes du composant de thème minimal category boxes et le problème a été résolu.