How to Hide sub categories in hamburger menu

How do I hide sub categories in the hamburger menu ?

I found the solution here

but I can’t find the show subcategory list in site_settings.

It should be in your Site Settings under Basic Setup

Which version are you on?

It was moved to the Edit Category dialog. Visit the Category topics, click Edit Category, then under the Settings tab it is Show subcategory list above topics in this category.

4 إعجابات

my version is v1.8.0.beta7 +10 and it is not showing in my forum

Check the Category Settings

إعجابَين (2)

OK its working. But I also don’t want to show subcategory list above topics in the category.

Unfortunately, both settings did that, so there isn’t any other way to feasibly get what you want at this time.

There is a pr-welcome to make it easier to hide sub-categories from the hamburger menu though

5 إعجابات

Enabling “suppress this category from the homepage” doesn’t remove the subcategory from the hamburger menu anymore. I’m on v1.9.0.beta4 +322.

You can do it via CSS which is more consistent

إعجاب واحد (1)

Not really useful for me as it will hide all subcategories.

Then customize the CSS to be (to target the hosting category)

.menu-panel .category-links.category-hosting { display: none }
إعجاب واحد (1)

I’m posting because it should work by using the setting not adding another css hack.

Another way is:

.menu-panel.drop-down .category-link.subcategory {
    display:none;
}

I noticed this code does not work on mobiles, even though I have it in ‘common’ anyone know why?

Already replied here, take a look:

https://meta.discourse.org/t/after-update-removed-category-suppress-option-css-doesnt-hide-them-on-mobile/83716/5?u=dax

إعجاب واحد (1)

Hi,

Is this the code to remove the “Uncategorized” Category from the hamburger menu?

.menu-panel.drop-down .category-Uncategorized {
display:none;
}

I am adding it to /admin/customize/themes/9/common/scss/edit, which is our site’s default theme.

It doesn’t seem to be working - help welcome! :slight_smile:

CSS selectors are case-sensitive. The rest of CSS, not so much (read more)

So instead of

.menu-panel.drop-down .category-Uncategorized {
  display: none;
}

try

.menu-panel.drop-down .category-uncategorized {
  display: none;
}
3 إعجابات

Hi @Johani, that worked perfectly. If anyone else is trying to figure out how to hide the uncategorized Category from the hamburger menu, they can try your solution with confidence. Thank you!

إعجاب واحد (1)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.