{"id":2017,"date":"2020-09-30T23:47:10","date_gmt":"2020-09-30T22:47:10","guid":{"rendered":"https:\/\/www.gmitropapas.com\/?p=2017"},"modified":"2020-09-30T23:47:37","modified_gmt":"2020-09-30T22:47:37","slug":"remove-uncategorized-category","status":"publish","type":"post","link":"https:\/\/www.gmitropapas.com\/remove-uncategorized-category\/","title":{"rendered":"Remove Uncategorized category"},"content":{"rendered":"\n

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

\"WordPress
WordPress default category<\/figcaption><\/figure>\n\n\n\n

Here are a few scenarios to deal with the issue.<\/p>\n\n\n\n

Rename the Uncategorized category<\/h2>\n\n\n\n

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

\"Rename
Rename Uncategorized category<\/figcaption><\/figure>\n\n\n\n

You can then assign the category to a blog post.<\/p>\n\n\n\n

Delete the Uncategorized category<\/h2>\n\n\n\n

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

\"Select
Select default category in WordPress<\/figcaption><\/figure>\n\n\n\n

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

\"Delete
Delete Uncategorized category<\/figcaption><\/figure>\n\n\n\n

Keep the Uncategorized category and hide it from the frontend<\/h2>\n\n\n\n

There might be cases that you might want to keep the Uncategorized<\/code> 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<\/strong> you display your categories in the front end through the use of a widget, for example.<\/p>\n\n\n\n

\"Category
Category widget<\/figcaption><\/figure>\n\n\n\n

In this case, use the following PHP snippet to hide the Uncategorized<\/code> category from the front end:<\/p>\n\n\n\n

function custom_category_widget($args) {\n\t$exclude = \"1\"; \/\/ Category IDs to be excluded\n\t$args[\"exclude\"] = $exclude;\n\treturn $args;\n}\nadd_filter(\"widget_categories_args\",\"custom_category_widget\");<\/pre>\n\n\n\n

And you will have something like this:<\/p>\n\n\n\n

\"Uncategorized
Uncategorized category removed from the frontend<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"

Removing the Uncategorized category can be a challenge for beginner WordPress developers. Here are a few ways to deal with the issue. <\/p>\n

Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":2021,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_seopress_robots_primary_cat":"none","_seopress_titles_title":"","_seopress_titles_desc":"Removing the Uncategorized category can be a challenge for beginner WordPress developers. Here are a few ways to deal with the issue.","_seopress_robots_index":"","footnotes":"","_vp_format_video_url":"","_vp_image_focal_point":[]},"categories":[1],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/www.gmitropapas.com\/wp-json\/wp\/v2\/posts\/2017"}],"collection":[{"href":"https:\/\/www.gmitropapas.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gmitropapas.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gmitropapas.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gmitropapas.com\/wp-json\/wp\/v2\/comments?post=2017"}],"version-history":[{"count":0,"href":"https:\/\/www.gmitropapas.com\/wp-json\/wp\/v2\/posts\/2017\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.gmitropapas.com\/wp-json\/wp\/v2\/media\/2021"}],"wp:attachment":[{"href":"https:\/\/www.gmitropapas.com\/wp-json\/wp\/v2\/media?parent=2017"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gmitropapas.com\/wp-json\/wp\/v2\/categories?post=2017"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gmitropapas.com\/wp-json\/wp\/v2\/tags?post=2017"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}