从“推荐主题”中隐藏特定类别或子类别

Hi everyone,

I’m running a Discourse forum for photographers and I have one category named “intro” with inside a sub-category named “introduce-yourself” where people can post a new topic and say hello. Those are not shown on the “latest” in order not to spam the front page of the forum.

But they still appear in “suggested topics” under other posts. How can I hide them and prevent them from appearing into “suggested topics” site-wide?

Example here:


(you might want to refresh the page a couple time, as suggested topics change at each refresh)

Thank you for your help!

Try something like:

#suggested-topics .topics .topic-list-item.category-introduction-introductions.ember-view {
    display: none;
}
3 个赞

Awesome, it worked! Of course it’s just hiding them visually so sometimes when it suggest me only this category then the suggested topic list will look empty but that’s fine. Thanks for helping!

You can set each category to show the suggested topics in all categories or only in that category in which the topic was written. If you get the “introduction” category so that the suggested topics are also from other categories, you will hardly remain without visible suggested topics.

Of course, the change is just a visual hack, if, for some reason, the suggested topics are only in the “introduction” category you will remain without any visible topic, as you said.

3 个赞

我似乎找不到这个设置(至少现在没有了?),或者它没有按预期工作:thinking:

站点设置名为 limit suggested to category,默认处于关闭状态。您是否打算将建议的话题限制在当前分类中?

您的头像很吓人 :scream:

2 个赞

我们有符合主题的类别,以及三个类别:“想购买”、“想出售”和“离题”,我希望将这三个排除在建议之外。在我看来,符合主题的讨论可以进行交叉推广,而二手类别(非常活跃)无论如何都会被浏览,通常还会把其他话题挤出列表。

至于“离题”类别,我只想将其隐藏,并非要以任何方式 discouraging 离题讨论,而仅仅是为了让注意力保持在原始语境中。

不过这也是个很好的问题:符合主题的类别划分是否过于细致?是否应该改用标签?但在进行任何重大变更或重组之前,我想听听大家的想法和最佳实践。:thinking:

不,并不是的 :joy:

挖出这个话题!在我们建议的话题中,经常有 2/5 来自我们希望排除的无关类别。目前,我启用了“限制建议到类别”设置,只是为了看看用户的反应。

但如果能有一个功能可以完全从建议话题中移除特定类别,那就太好了。

2 个赞