Do you ever look at some of your posts and think they should be in a different category?
Maybe you have 2 categories which are very similar and you want to merge them together.
Of maybe you simply want to delete a category which you have created but haven’t assigned any posts to.
Pretty much anything is possible with WordPress considering its highly flexible.
This guide will show you everything you need to know about creating, changing, editing, moving and deleting WordPress categories.
Here’s a post i wrote earlier about the basics of WordPress categories.
Changing Category Name
All you need to do to change the category a post or posts are assigned to is change it in the category module which is located under every edit posts screen.
You might think that this will cause the permalink to that post to break but it won’t.
Even though the permalink will change, the old link will be directed to the new permalink.
The reason for this is that WordPress runs on the post i.d and not the permalink. The post i.d remains the same even after changing the category slug.
The category slug is the part of the link between your domain name and the part of the link which contains the post title.
If you have too many categories which are similar, you can consolidate them so you have less categories.
Use the above method and then delete the unused categories.
Navigate to the Posts tab in your Dashboard and click the Categories link.
Here you’ll find a list of your categories.
You can easily create new categories here or by using the Category module under all your edit post screens.
You can also add introductory content which will be displayed at the beginning of the category archive page.
If your theme doesn’t allow this, you can simply add a description.
To delete a category, simply click the delete link.
If there’s no posts assigned to the category you delete, then it will simply be deleted.
If you do have posts assigned to a category and delete it, the posts will become assigned to the uncategorized category.
You can reassign them before or after deleting the category however its better to move them before you delete the category.
Number Next To Category
As the above screenshot shows, there’s a number 2 next to the category free-wordpress-themes-2.
This can because by a number of reasons.
This may be the second time a category using this exact same slug has been created.
Or it may be caused by a posts tag with the exact same slug.
Or it may be caused by a page or posts with the title exactly matches a category which already exists or did exist.
You’ll need to find out where the duplicate is and change or delete it.
WordPress stores both category and tag slugs in the same database table which is why there can’t be 2 category slugs which are exactly the same. If this happens it simply adds a number to the end which can be 3,4, 5 etc depending on how many times this has happened and how many slugs are the same.
Each permalink needs to be unique which is why WordPress works this way.
Here’s a post about how to fix duplicate category slugs in WordPress.
Delete Uncategorized Category
The uncategorized category is built into the WordPress core.
The only way to delete it is to select a new category to use as your default post category and then delete the category named ‘uncategorized’.
If you go to your writing settings, you will find your Default Post Category is set to uncategorized.
You can change this to another category so all posts which are unassigned when published, will be assigned to the default post category you set here rather than the uncategorized category.
Converting Categories To Tags
By default, you’ll find WordPress includes a link to a plugin which you can use to convert categories to tags and tags to categories. You’ll find the link under the Tools tab in your dashboard and the actual link to install the plugin on the Import screen.
If you’ve created far too many categories, you could convert them to tags and assign your posts to a smaller amount of categories.
On the other hand, you may want to convert posts which aren’t assigned to any category but are tagged.
Using the plugin to selectively converter from one to another is the best way to do this.
Simply select which categories you want to convert to tags and click the convert button.
This is a reat way to add tags to your posts and reduce the amount of categories at the same time.
You can simply rename your categories without changing the category slug.
Go to Posts > Categories and find the category you wish to edit and rename.
Using the Quick Edit link, you can edit the name of the category and change the slug in the permalink as well.
Its best practice to use keywords which describe the posts assigned to that specific category.
One to two word category names are best however you could use 3 or 4 words also.
Its best to keep your categories to a minimum and use tags to group more specific content together within the one category.
Moving Posts To Another Category
I decided to move 63 posts from the plugins category to the WordPress plugins category. No point in having 2 categories which are the same and all plugins i write about are WordPress plugins anyway.
The easiest way to do this was to set the default post category to WordPress plugins and delete the plugins category.
When you delete a category, all the posts are assigned to the default post category resulting in mission accomplished.
Redirecting Deleted Category Page Archives
Even though posts assigned to new categories will load without error, you’ll notice that links to the old category archive pages will be broken as the old categories have been deleted.
The easiest way to fix this is to redirect any categories you deleted to the new category archive or post tag archives.
You can do this in cPanel or by creating a .htaccess redirect.
Duplicate Meta Descriptions & Titles Tags
I’ve found that after reducing and moving posts to the new categories that the category archives that i deleted are now showing in Google Webmaster Tools under HTML Improvements.
Duplicate meta descriptions 471
Duplicate title tags 487
Learn more about fixing duplicate title tags & meta descriptions.
These may take some time to be removed from displaying in GWMT.
Plugin to Reorganize Categories & Tags
There’s an excellent plugin which helps you reorganize your tags and categories.
It also adds two new options to the Bulk Actions dropdown on term management pages:
- Merge – combine two or more terms into one
- Set parent – set the parent for one or more terms (for hierarchical taxonomies)
- Change taxonomy – convert terms from one taxonomy to another
It works with tags, categories and custom taxonomies.
The reason i wrote this post is because i made the mistake of creating too many categories on this site when i first started out.
At the time of writing i have 48!
Still deciding on what i am going to do however i have learn’t about how to easily change, edit and delete them so it won’t be much work when i have made a decision.
Update: Fixed this problem and assigned my posts to 11 categories.
How About You
Share your thoughts and experiences related to categories in the comments if you like.Subscribe for new Tutorials