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

Ad You might find this useful
Loom
Record your screen to communicate better

Loom is the fastest way to record quick videos of your screen. It's easy to use and perfect for hybrid workplaces. FREE & affordable paid plans.

LoomLoom
Record your screen to communicate better
Promo Save on Loom
Ad You might find this useful
Wavebox
Wavebox is the revolutionary browser you should be using Now!

Be more productive with apps, tidy tabs, multi-account sign-in, unified search, flexible workspaces, and more...

Get 35% OFF with the Slick Media Wavebox Promo Code (click promo link bottom-right)

WaveboxWavebox
Wavebox is the revolutionary browser you should be using Now!
Promo Save on Wavebox
Ad You might find this useful
Rize
Maximize Your Productivity with Rize AI

Rize is an AI productivity coach that uses time tracking to improve your focus and build better work habits. It is available for macOS and Windows.

With the Slick Media Promo (click promo link bottom right), you can get a 25% discount on your first three months of Rize.

RizeRize
Maximize Your Productivity with Rize AI
Promo Save on Rize
Ad You might find this useful
Surfshark
Award Winning VPN Deal

Become invisible online with Surfshark VPN and protect your online presence with: -

100 VPN Server locations
Alternative email generator
Data breach alerts
Malware protection
Tracker and ad blocker

SurfsharkSurfshark
Award Winning VPN Deal
Promo Save on Surfshark
// 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;
}
add_filter("widget_categories_args","exclude_widget_categories");