Hide categories in drop down list widget

Hi,

Can I use a custom CSS to hide the empty categories used in projects, in a drop down category list widget? There is no “.cat-item-(category id)”. The class is “postform”, option class=”level-0″ and value-“(category id)”.

http://www.petkovstudio.com/timeline/ or drop down category list widget in any other post.

I have done it in theme functions (forgot how and I loose the code after theme update) but I prefer using custom CSS.

The solution of Awan in https://athemes.com/forums/topic/hide-type-ab-categories-in-blog/ is perfect but it does not work in drop down list.

Thank you veru much in advance.

Blago

Hello Blago,

It doesn’t look like there is an easy way to do that, but you can check these links:
https://www.w3schools.com/howto/howto_css_dropdown.asp
https://www.w3schools.com/css/css_dropdowns.asp

Please feel free to ask any other questions that you might have.

Kind Regards, Roman.

Thank you Roman,

The pages you offered me are very useful.

Awan also make a good and simple CSS that hides category from the built in wp drop down list: athemes.com/forums/topic/hide-type-ab-categories-in-blog/#post-947599

Kind Regards, Blago

You are welcome Blago,

Kind Regards, Roman.