Can I limit the number of categories in the drop down menu?

(Tim Meade) #1

We are setting up a new site that will have a lot of 2nd tier categories. I would like to just have the first tier, or ‘liked’ categories show in the drop down hamburger menu. Is this possible? With 200+ categories in total, sometimes this menu does not come down at all.



(Jeff Atwood) #2

Yes, turn off subcategory display in the site settings.

(Tim Meade) #3

Thanks. Having trouble finding it. Can you point me in the right direction?

(Tim Meade) #4

I believe i found it. Show subcategory list instead of topic list when entering a category does what i was looking for.

Thanks again.

(Jeff Atwood) #5

To be fair, this setting might be a little misnamed since it does have some other effects on the system … I guess we should call it the “I have way too many $%^#* categories” setting :wink:

(Sebastian) #6

where did this setting go?

(Jeff Atwood) #7

Edit the category and set it there.

(Sebastian) #8

all I find there is suppressing from home page. I want to not show categories in the hamburger menu. I think I misread the issue of Tim’s original post here though.

(Jeff Atwood) #9

I believe that’s the same setting. Try it. @neil can confirm

(cpradio) #10

If you are only wanting to limit the categories in the hamburger menu, CSS can do it.

/* to hide them all */
.hamburger-panel ul.category-links { display: none; }

/* to hide only subcategories */
.hamburger-panel ul.category-links li.subcategory { display: none; }

You can also target specific categories (but you need to use Dev Tools, right click inspect element to see the category specific selector to use

.hamburger-panel ul.category-links li.category-specific-selector { display: none; }

(Sebastian) #11

thanks! I notice that I might have to actually selectively hide the, as all/nothing seems to be a bit too blunt in my case. i will figure it out.

I noticed something strange though: the uncategorized category, which I had disabled the night before, seems to be showing in the hamburger menu. What’s up with that (see other topic)

(cpradio) #12

This seems to be a bug (see below screenshots)

I have uncategorized disabled

It is not visible when creating a new topic: :white_check_mark:

It is not visible on Latest :white_check_mark:

It is not visible on the Categories page :white_check_mark:

It is visible in the Hamburger Menu :x:

Visiting the category (via hamburger menu), choosing Edit Category and Suppress from homepage doesn’t affect it

(Sebastian) #13

Found another problem. Hiding categories this way not only hides them from the hamburger, but also from the “all categories” dropdown in the top menu. Which turns the text “all categories” into a lie :slight_smile:

(Mittineague) #14

Having it say “all categories you have permission to” would be a bit lengthy, no?

Remember to test both as an Admin (universal permission) and as a non-Admin member.

(Sebastian) #15

Well I wasn’t all that serious, but I really just want to limit the amount of categories in the hamburger menu, the other one can show them all. Two different UI elements with different space constraints and requirements in my thinking…