Hide type-a , type-b from blogs page categories

How do I hide the services categories from the blog page categories?

Hello,

Can you please provide a link to your website?

Kind Regards, Roman.

Hey Roman, I am running the website on the local host. The problem is the services which are displayed on the main page are under categories type-a and type-b. When I view the blogs page, these categories are also getting displayed.

Hello,

Categories have classes with ID, so they can be hidden with CSS by ID. But I have to see page code to find that ID. Can you please let me know when your website is live?

Kind Regards, Roman.

Hello Roman, I solved the issue by pasting this function in the functions.php

function exclude_widget_categories($args)
{
    $exclude = "11,12"; // where 11 and 12 are ids of type-a and type-b
    $args["exclude"] = $exclude;
    return $args;
}
add_filter("widget_categories_args","exclude_widget_categories");

Great! And thank you for sharing a solution.

Kind Regards, Roman.