Disabling categories

I would love ability to disable categories. My forum has only around 3-5 new topics a day. There is just not enough traffic to justify categorization of new topics.

So basically I’m thinking of some switch in settings that would allow to hide Category column, All Categories button and basically any UI element to do with categories. I know I could do it with CSS but there is no guarantee future updates don’t break it.

Would you agree that for small forums, category feature is unnecessary overhead and contributor to unjustified UI clutter?

3개의 좋아요

I agree completely that on a small forum (and to be honest even the medium sized ones) categories are pointless mental overhead. The common risk is over-categorization more so than not enough:

But hiding the topic list category column in css should be fine and I cannot think of any reason that would easily break in the future.

Glad I’m not the only one. I’ve added following CSS definition to my stylesheet to hide categories.

th.category,
td.category,
a.badge-category,
div.category-input,
ul#category-filter li:last-of-type
{ display: none !important; }
2개의 좋아요

You mean as a customization in the admin panel, not editing the stylesheets… right?\

:wink:

Yeah, I’ve inserted CSS through admin panel.

I can’t get @lubos’s solution to work with the current Discourse version. The reason is that pinned topics has:

  • no category column,
  • a first column with colspan=2.

So when hiding td.category, the resulting table has pinned topic’s rows larger than other rows.

I’ve tried to hide the second column with td:nth-child(2), but it has the drawback of hiding pinned topic’s authors (plus maybe it’ll break on mobile).

Since 2014, has another solution to disable categories on small forums been implemented or figured out?

Hi @jack2, try this to disabling categoriers on the topic list and on the hamburger menu:

.topic-list .category.sortable, .topic-list .category, .category-links.clearfix {
    display: none;
}

If you want to disable the category box when a user open a new topic add this element too:

.select-box .select-box-header

2개의 좋아요

Thanks @Trash, but it doesn’t work well for the reason I’ve explained earlier. Here is what your CSS looks like with a pinned topic:


Mmm I don’t see that issue with pinned topics. Let me see in my test site, where I have the Welcome topic…

@jack2 that particular topic is without category (uncategorized).
The simplest fix is to move it in a category otherwise you have to create other css code for targeting pinned topics without category

5개의 좋아요

Hi @Trash,

How can I disable the categories menu too?

.list-controls .category-breadcrumb .has-drop.box { display: none; }

4개의 좋아요

Does anyone knows how to hide categories for all users but staff. Use case: a new site without a lot of posts, but the admin can start categorizing posts right away, for the future.

There is a .staff class in the body tag. I was trying using the : not (X) property but I wasn’t able tho achieve it.

Maybe using SCSS?

Hi @dax, the only one of these working is removing categories from the hamburger, otherwise they’re not working. Any suggestions?

In two years the classes and targets used in the CSS above will be changed. Try with

.topic-list .topic-category {
    display: none;
}

to hide the categories from the homepage.

5개의 좋아요

누군가 사용자 정의 CSS로 네이티브 CSS를 보완하여 원치 않는 부분을 숨기는 대신, 네이티브 CSS 자체를 직접 수정하는 데 성공했나요?

누군가의 경험이나 조언을 듣고 싶습니다. 그렇게 하면 프론트엔드에서 몇 바이트를 절약할 수 있겠지만, 소프트웨어 업그레이드할 때마다 Discourse 내부 깊숙한 부분을 직접 건드려야 하지 않을까 싶습니다?

1개의 좋아요

네, 저도 설정에서 각 카테고리를 개별적으로 조절할 수 있는 정말 멋진 “미세 조정” 기능이 있으면 좋겠다고 생각합니다. 모든 사람에게 카테고리를 숨김 (Stuff 제외) 같은 기능 말이죠.

1개의 좋아요

관리자는 관리자 설정의 default categories muted(기본 음소거 카테고리)에서 기본적으로 음소거될 카테고리를 설정할 수 있습니다.

해당 카테고리 페이지의 오른쪽 위 모서리에 있는 관리자 wrench(렌치) 아이콘을 클릭하고 보안 탭으로 이동하여 각 카테고리의 권한을 설정할 수 있습니다.在那里에서 특정 그룹만 게시물을 열람, 답글을 달거나 생성할 수 있도록 설정할 수 있습니다.

또한 이 테마 컴포넌트도 있습니다.

2개의 좋아요