Is there any way to suppress the listing of subcategories (only list the parent category) in the hamburger menu. I’ve poked around quite a bit and not able to find a way.
Thanks!
Suppressing subcategories in the hamburger menu
Loki asked if it’s possible to hide subcategories in the hamburger menu, only showing parent categories. Lhc_fl provided a CSS solution: .hamburger-panel .category-link.subcategory { display: none; }.
Alternatively, keegan suggested using the Category Hider Theme Component, which Loki found helpful. Loki also asked about hiding a specific category using CSS, and Lhc_fl provided the solution: .hamburger-panel .category-link.category-{{slug}} { display: none; }.
After installing the Category Hider Theme Component, Loki reported a typo in the settings, which keegan promptly fixed. Loki also pointed out another instance of duplicated explanatory text, which keegan acknowledged.
Is there any way to suppress the listing of subcategories (only list the parent category) in the hamburger menu. I’ve poked around quite a bit and not able to find a way.
Thanks!
You can use this CSS ![]()
.hamburger-panel .category-link.subcategory {
display: none;
}
There’s also this theme component I’ve created in the past:
Thanks! I’ve added it. Works great.
One followup question (since I know nothing about CSS), without using the Category Hider, is there some CSS that I could add that would hide one specific category?
@Lhc_fl Thank you again!
@keegan I did end up installing the Category Hider Theme Component for easier future flexibility. It’s working great, so thank you for that!
I did notice one typo in its settings:
Not a big deal, but thought you’d want to know that.
@Loki Thanks for letting me know, I’ve pushed out a fix ![]()
@keegan I just noticed another instance where the explanatory text seems to be duplicated inadvertently:
Thought I’d let you know.