Exclude Category from WordPress Category Widget

Here is a WordPress snippet to exclude a Category from displaying in the Native WordPress Category Widget. Simply add this tour your functions.php file in your theme:-

// Exclude Category from Native WordPress Category Widget
function exclude_widget_categories($args){
$exclude = "1,2,4"; // The IDs 1,2,4 of the excluding categories
$args["exclude"] = $exclude;
return $args;
About the Author
Exclude Category from Wordpress Category Widget 0da77002febbfe28d15144a57bbcc2c9 s 180 d mm r g


A highly experienced Web Designer / Web Developer (Webflow, WordPress, Weebly & Custom), Front-end / Back-end Developer & New Media Specialist, with extensive knowledge of a wide spectrum of technologies in the Development and Creative Industries, built up over a number of years.