
Hide specific category from default widget category
April 12, 2020
Hi, if you need hide specific category from default widget category, try put this into function.php
//Hide categories from WordPress category widget
function exclude_widget_categories($args){
$exclude = "1,2,3,4,5";
$args["exclude"] = $exclude;
return $args;
}
add_filter("widget_categories_args","exclude_widget_categories");
Posted in Tutorials