Is there a way to remove the lock badge for some categories but not for others?

(Franz Mutschler) #1

Hello guys,

as the title suggests, I am looking for a way to remove the lock badge for some categories, but not for others.
I managed to do this for the category-drop-header, since I can use the category ID to only remove the lock icon for this category, instead of globally.

I did not, however, manage to remove the icon for the badge in the category overview (cf. screenshot) and in the drop-down list of categories in the search.

Do you have any suggestions for me? I’m pretty new to working with CSS and I’ve exhausted my own approaches.

Thanks a lot!

I read both of the following threads, but could not find a solution that worked for me:



I think this should do it:

// Hide the lock icon for specific categories on topic lists and hamburger menu,
// and hide the lock icon on all dropdown search results
.search-menu .results .restricted,
[href="/c/MY-CATEGORY-SLUG3"] {
    .fa-lock {
        display: none;

Just replace the MY-CATEGORY-SLUG# part with the slugs of the categories you want to have the lock icon hidden.

Unfortunately there isn’t enough to work with in the HTML to pick and choose which categories show the lock icon in the dropdown search results with CSS, so it’s all or nothing for that part. You will need to decide if you want to show or hide the lock for all restricted categories. If you want to show it, just remove this part: .search-menu .results .restricted,

Hopefully that gets you pretty close to what you are looking for!