Heliosurge
(Dan DeMontmorency)
2021 年 10 月 25 日午前 12:15
1
Hi @team ,
I apologize if using the Team mention was not correct.
In Category Options can we have some new settinga for displaying?
Ie
Show in Hamburger Menu
Category Boxes
I ask as it seems some structures have changed. I had used prior css to hide subcategories in the Hamburger menu.
.Hamburger-panel li.category-link.category-OMR-ANOUNCE-OMR-BULLETINS {
Display:None;
{
Recent Update changed I am guessing part of the structure.
So I had Noticed someone made a theme component called Category Hider. Though it seems latest update has broken this component( I have left a reply there notifying author it is broken).
If in the meanwhile if someone could give me some quick fix even in the hamburger menu css would be great.
Thanks Team for an amazing forum software!
I’ve just had a quick test, and this seems to work: (though check I’ve put your category in right)
.panel-body {
li.category-link.category-OMR-ANOUNCE-OMR-BULLETINS {
display: none;
}
}
I’m not very proficient in css though, so consider this a stopgap answer until someone more knowledgeable turns up.
「いいね!」 4
IAmGav
(Gavin Perch)
2021 年 10 月 25 日午後 5:56
3
Just remember, that if you rename your category slur, you need to change it in the css as well
「いいね!」 1
Heliosurge
(Dan DeMontmorency)
2021 年 10 月 25 日午後 7:30
4
So is it now
.panel-body
Instead of .
.hamburger-panel
Thanks that will be easy enough to fix.
nolo
(Manuel)
2021 年 10 月 25 日午後 7:53
5
It’s not “Instead of” though: .panel-body
is a class targeting all panel bodies, while .hamburger-panel
is targeting, well, the hamburger panel.
So I don’t know what specifically changed in core that broke your previous code. But if you want to hide all subcategories from the hamburger menu this would seem most straightforward to me:
.hamburger-panel .category-link.subcategory {
display: none;
}
「いいね!」 3
Heliosurge
(Dan DeMontmorency)
2021 年 10 月 25 日午後 8:15
6
Not sure but neither code is hiding the subcategories in the hamburger menu.
The Theme component Category Hider is. Not working
I have tried both
.hamburger-panel in my snippet and the gentleman’s code. Neither is hiding the entries.
For what it’s worth, both codes work on my test site.
「いいね!」 2
nolo
(Manuel)
2021 年 10 月 25 日午後 8:23
8
Yes, it works on my instance too. You could select a subcategory link in the browser inspector:
Then check the style declarations. If the rule I posted doesn’t hide the link, there has to be another one that’s more specific on your instance.
「いいね!」 1
Heliosurge
(Dan DeMontmorency)
2021 年 10 月 25 日午後 8:24
9
Weird. I had switched to category hider as original code I think might have been @awesomerobot ? Shared stopped working.
Heliosurge
(Dan DeMontmorency)
2021 年 10 月 25 日午後 8:30
11
Okay will check it in a bit. Thanks for your help. Trying to fix this via mobile will need to look on desktop.
Diacourse Category Hider just broke with latest stable update.
「いいね!」 1
nolo
(Manuel)
2021 年 10 月 25 日午後 8:36
13
Works when I add the rule in the inspector…
…there’s indeed a lot to hide there
「いいね!」 1
Heliosurge
(Dan DeMontmorency)
2021 年 10 月 25 日午後 8:48
14
Yeah had it only that Parent categories displayed. Will have to try a blank theme component and see if it works.
Could it be caching the site on my end?
Heliosurge
(Dan DeMontmorency)
2021 年 10 月 25 日午後 8:59
15
That is awesome! Prior to having to hide each entry. This works great thank you.
.hamburger-panel .category-link.subcategory {
Display:none;
}
Much simpler. Now only need to hide Obsolete categories.
「いいね!」 4
Heliosurge
(Dan DeMontmorency)
2021 年 10 月 26 日午前 1:26
16
I just wanted again to thank everyone for there expertise in helping me solve this in a speedy fashion.
「いいね!」 2