Can I hide a category from the Latest page?

(Lowell Heddings) #1

I would like to hide my Computer Help category from the Latest page, and add an option to the navigation menu to quickly jump straight to that category.

At some point on some topic I remember hearing that we can hide Meta posts this way, so I’m wondering if we can do this with another category.

Hide one category from latest posts view
How to hide topics of multi categories and their all sub-categories from latest page
Forum-wide Category Selection for Digest Email?
(Sam Saffron) #2

We used to have this feature, but it seems to have regressed, will have a look at sorting it out again

(Sam Bauch) #3

As for the other part of your question, putting the link to a category in the nav is doable with changing one line of code and editing a site setting.

I did this with one of my categories:

I then also edited app/assets/javascripts/discourse/models/nav_item.js to:

validNavNames = ['latest', 'hot', 'categories', 'category', 'favorited', 'unread', 'new', 'read', 'posted', 'directory', 'category/events'];

Now that I take a second look though, maybe you don’t even have to make this change to the model. The next few lines of code handle this exact case, where you want to link to a category, and imply that you should put ‘category/computer help’ in your Site Settings:

categoryName: function() {
    var split = this.get('name').split('/');
    return split[0] === 'category' ? split[1] : null;

(Lowell Heddings) #4

It actually doesn’t work right for me… the only way I can do it is with category/computer-help but that capitalizes weirdly. Anything else doesn’t work.

(Sam Bauch) #5

yeah, i was a bit worried about the space in your category title. probably not too difficult a fix though, might be able to give it a try today.

(Lowell Heddings) #6

Thinking about this a little more - it would be useful to be able to hide the category from the Latest page, but if you submitted a new topic, that could still be shown on the Latest page… so people wouldn’t be confused if their new topic disappeared on them.

The whole idea is that I want to be able to change what shows up on the home page, because it’s boring.

(Jeff Atwood) #7

Right but this is what the hot tab and the per category hotness settings are for.

And on a per user basis, ignoring categories should be possible at some time in the not too distant future.

I do not feel shoehorning this into the latest tab is the correct approach.

(Lowell Heddings) #8

Right, but I’m not going to get the Hot tab, am I? And we’re not going to do the navigation changes I originally asked for… that were supposed to be replaced with the Hot tab.

I’m trying to find some way to build a community that isn’t all about tech support, which is impossible since I can’t get the boring tech support posts off the latest page. It was pretty much my entire reason for switching to Discourse… to build a forum that isn’t dominated with tech support. I was quite clear about that.


So irritated.

(Lowell Heddings) #9

It’s a very simple and easy code change to hide a category from the Latest page, and add that to the menu bar, and it should not prevent the future hot tab from happening.

Can we at least implement that as a feature?

(Sam Saffron) #10

I went ahead and enabled the hot tab on htg, you can play around with it see if you can get it to display stuff you like by adjusting category hotness.

(Sam Saffron) #11

Yes I am going to fix this regression … looking in to it

(Lowell Heddings) #12

The problem with the Hot tab is that it should be biased 90% towards freshness - right now the top 10 list has a topic from 34 days ago with only a single reply on it. The algorithm is busted.

I think what I actually want would be accomplished more easily if I can hide a category from the Latest tab, and then put a link on the main navigation menu.

(Sam Saffron) #13

I’ll fix that for you today

(Jeff Atwood) #14

Well, I just counted on the front page of and out of 28 topics in the list, 8 of them are computer help.

That’s 8 out of 28, or 28% of the topics as computer help on the homepage right now.

And if we look at the all time category topic counts on the categories page:

31  mobile
23  tutorials
44  geek life
44  fun
105 meta
20  Linux
40  uncategorized
68  hardware
95  general
67  windows
280 htg articles
229 computer help

1,046 topics total of which 229 are computer help, that is 22% of the total.

Is it fair to call that “dominating” the forum? Not even close to 1/3 of the topics are computer help.

(Jeff Atwood) #15

Just to update this, the “move a category off the latest tab and into a top level link” is now up and running at with the computer help topics.

(Jonathan Sandlund) #16

Hey @codinghorror, how did they do this? I can’t find the documentation anywhere.

(Lowell Heddings) #17

Basically like this… comma and minus the category.


(nXqd) #18

How to ignore multiple categories on Latest , I have tried latest,-category1,-category2 but it doesn’t seem to work :frowning:

(Jacob) #19

So these are my settings, and everything works great.

Except when I log out, Staff is still in the top menu.

It’s not a huge deal, but would be nice if that was automatically hidden to users not in the staff group.

Has anyone built something for informal status updates - Chat?
(Michael John Kirk) #20

Would you be better suited by making that a read restricted category?

Just go to categories and adjust the security to set which group can see it.