Thanks to a message posted a Web User Forums I found a wordpress hook that caught my attention, as it serves to hide categories from the widget that WordPress displays by default, to display the list of categories on the sidebar.
To exclude one or more of the default categories from the “Categories” widget of WordPress, add these lines of code in the functions.php of the theme you are using:
exclude_widget_categories function ($ args) {
$ exclude = "3,6,18" / / The IDs of categories to exclude
$ args ["exclude"] = $ exclude;
return $ args;
}
add_filter ("widget_categories_args" "exclude_widget_categories");
If your theme does not contain any file functions.php, you can create one yourself remembering that you must edit this as plain text. In that case you should also set the php tag:
<? php
exclude_widget_categories function ($ args) {
$ exclude = "3,6,18" / / The IDs of categories to exclude
$ args ["exclude"] = $ exclude;
return $ args;
}
add_filter ("widget_categories_args" "exclude_widget_categories");
?>
I hope this is as useful to you as it was for me
These helpful works by WordPress makes it The World Press. By the way thanks.