Is there any way to remove subcategories from the hamburger menu

Are you on the absolute latest version of Discourse? There was a bug (since resolved) that caused the issue you described…

2 Likes

Replying to myself here…

Since I first had a chance to look at this I’ve been busy with travel, and will continue to be travelling for the next 2 weeks, limiting my ability to look at this (I don’t have a dev instance on my travel PC). If someone else wants to take a stab at the PR, feel free. Otherwise, I’ll work on it in a few weeks.

4 Likes

This is now done.
https://github.com/discourse/discourse/pull/4749

8 Likes

Well I’m not sure if it was an update or not that resolved the issue, but it seems to have changed so it’s now working properly. Thank you!

2 Likes

This is now merged. You can remove the subcategories without needing to turn on the sub-category listing by using

.category-links .category-link.subcategory {
  display: none;
}
3 Likes

just thinking loud …

what is the reason that the appearance of the subcategory option in the category page is linked to their presence in the hamburger menu?

I can’t use the beautiful box-style for the subcategories and at the same time have subcategories in the menu! can I?

1 Like

Where can i access sandbox settings or how can i remove subcategories from displaying it in the main menu?

Got a Screenshot of what you mean with Main Menu?

Which code do i need to edit to hide sub categories from hamburger menu?

Edit category settings and turn it off for that category.

1 Like

Try this CSS

.category-links .category-link.subcategory {
  display: none;
}
2 Likes

There is no way to just turn it off for the hamburger menu. If you turn off display on front page, it disappears in the parent categories also.

For some reason I cannot find this setting but I have seen the subcategories listed when clicking on the parent category (like HERE) so it appears to be possible somehow. If anyone knows how to do this please let me know. Thank you.

Joshua Rosenfeldjomaxroteam

Feb '17

You’re looking for this setting: Show subcategory list instead of topic list when entering a category.

If I’m understanding correctly what you are trying to achieve, these should be the steps to follow:

  1. Navigate to the parent category
  2. Click on the 44%20PM button to open the category settings
  3. Go to the Settings section of the window
  4. Check the setting called Show subcategory list above topics in this category.
  5. Select the style you want from the dropdown menu

Hopefully that helps!

6 Likes

Doh! Not sure how I missed that. Thank you very much!
-Scot

1 Like