The best I can do with code is just trial and error. I spent the last few hours trying to find a way to hide a category from a widget, editing different php files.
Finally I found this plugin. This is a great plugin. It works great. I really want to thank the author.