How to Convert WordPress Categories to Custom Taxonomies


When you are looking for a way to turn categories into taxonomies in WordPress, you are on the right page. Because in this article we will show you how to convert WordPress categories to custom taxonomies.

But before we start this guide, you should know that categories are one of the two default taxonomies that can help in sorting content. Even WordPress allows its users to create their own custom taxonomies.

Why You Need to Convert Categories to Taxonomies

Categories and Tags are the two default WordPress taxonomies. The function of this taxonomy is to group and organize content so that it is easy to distinguish based on the topic of discussion.

But as your website grows, you may need to change the categories to a custom taxonomy that you create yourself. For example, if you have a category with many subcategories, it will take a long time if you have to edit each post to group them into a custom taxonomy.

This can be easier if you know how to convert some or all categories in bulk to the taxonomy you want.

How to Convert WordPress Categories to Custom Taxonomies

First, you must install and activate the Taxonomy Switcher plugin. For more details, you can see our guide on how to install a WordPress plugin.

Once activated, go to Tools > Taxonomy Switcher on the left panel to open the conversion page.

Taxonomy Switcher

Next, you can select the taxonomy you want to convert and choose the destination of your custom custom taxonomy.

Define a Destination Taxonomy

If you want to convert all categories to a custom taxonomy, then you can click on the Switch Toxonomies button now.

When the conversion process is complete, you will see a message indicating the conversion process was successful.

Successful Conversion

If you want to convert a specific category, you can use the category ID and enter it in the “Comma separated list of term ids to switch” column.

Specific category conversions

To skip the derived category, you can add the parent category ID in “Limit taxonomy switch for child terms of a specific parent”.

Click Switch Taxonomies to start the conversion.

Create Redirects From Categories to Custom Taxonomies

After you have finished changing the category to a custom taxonomy, when the archive page is opened it will show a 404 error.

This will be a fatal mistake when you haven’t realized it while the search engines have successfully indexed it. As a result, users coming from search engines will see a 404 error page when visiting it.

To fix this issue, you can redirect users to a new taxonomy page for each category.

Here are the steps.

You must install and activate the Redirection plugin.

Then, open the Tools > Redirection menu. In ‘Sources URL’ you can enter ^/category/.* and in ‘Target URL’ you must enter a custom taxonomy slug, eg /formats/$1.

Create a new redirect

Don’t forget to select the ‘Regex’ option, and click Add Redirect to add your settings.

The settings above will redirect all traffic from the category archive to the custom taxonomy you have created. Use this method when you don’t want to use categories at all.

We hope this article helped you learn how to convert WordPress categories to custom taxonomies. You may also want to see our guide on how to create a custom login page in WordPress.

You might also like
1 Comment
  1. moudjib says


Leave A Reply

Your email address will not be published.