Web & Digital design and development

Specializing in custom WordPress site development and graphic design.

Remove Uncategorized category - Feature image

Remove Uncategorized category

This has been bugging the WordPress community quite often. The main issue is that the Uncategorized category is set as the default category in the WordPress dashboard. Just go to Settings -> Writing and check at the top!

WordPress default category
WordPress default category

Here are a few scenarios to deal with the issue.

Rename the Uncategorized category

In the WordPress backend, go to Posts -> Categories and click the Uncategorized category to rename it. You can also use the Quick Edit link.

Rename Uncategorized category
Rename Uncategorized category

You can then assign the category to a blog post.

Delete the Uncategorized category

In addition to the previous solution, you can also unassign it as a default category, rename it and delete it. Go to Settings -> Writing and select a different Default Post Category from the dropdown.

Select default category in WordPress
Select default category in WordPress

Once a different default category has been selected, you can head back to Posts -> Categories. You will then be able to not only rename the Uncategorized category but also delete it since it is not the default category anymore.

Delete Uncategorized category
Delete Uncategorized category

Keep the Uncategorized category and hide it from the frontend

There might be cases that you might want to keep the Uncategorized category as it is. Your editors might find it handy to have blog posts saved for review in this category for convenience. In this case, you can leave it as it unless you display your categories in the front end through the use of a widget, for example.

Category widget
Category widget

In this case, use the following PHP snippet to hide the Uncategorized category from the front end:

function custom_category_widget($args) {
	$exclude = "1"; // Category IDs to be excluded
	$args["exclude"] = $exclude;
	return $args;
}
add_filter("widget_categories_args","custom_category_widget");

And you will have something like this:

Uncategorized category removed from the frontend
Uncategorized category removed from the frontend

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.