I’d like to remove the sub-category from this view. Does anyone have any idea how to do that?
Jacob
jacob_kahn wants to remove child categories from the Categories with Featured Topics view and asked for help. Canapin provided a CSS solution: .subcategories { display: none; }, but noted it may cause unintended effects if used elsewhere on the forum. Lhc_fl suggested a more specific selector: .categories-list .category-list.with-topics .subcategories { display: none; } to avoid potential issues. jacob_kahn thanked both users for their help. Canapin agreed with the more specific selector and also recommended hiding .subcategories-list for the mobile view.
So you can use this instead :D.
.categories-list .category-list.with-topics .subcategories {
display: none;
}
Yeah, that would be safer.
edit: I took a look at Discourse’s code, .subcategories alone should be safe (I personally like to use not too much selector depth if I can avoid it), and you should also consider hiding .subcategories-list as well as it’s the subcategories parent container on the mobile view.