Heliosurge
(Dan DeMontmorency)
2021 年10 月 25 日 00: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 日 17: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 日 19: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 日 19: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 日 20: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 日 20: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 日 20: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 日 20: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 日 20: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 日 20: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 日 20: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 日 01:26
16
I just wanted again to thank everyone for there expertise in helping me solve this in a speedy fashion.
2 个赞