How to Convert WordPress Categories to Custom Taxonomies

However, if you just want to convert singular or multiple categories into this taxonomy, then you will need to add the IDs of those categories into the ‘Comma separated list of term ids to switch’ field.

Add category ID

From here, simply add /category/.* into the ‘Source URL’ field.

The Redirects page will now be displayed on your screen.

Note: AIOSEO also has a free version. However, you will need the pro version for this tutorial to unlock the 301 redirection feature.

This means that we will be converting a category into a custom taxonomy.

Choose categories option from the Taxonomy to switch from dropdown menu

Once you have done that, just click the ‘Add New’ button at the bottom to create a new taxonomy term.

First, you will need to install and activate the Taxonomy Switcher plugin. For more detailed instructions, you may want to see our step-by-step guide on how to install a WordPress plugin.

Now visit your WordPress block editor by opening up a new or existing post/page.

However, if you want to skip the child categories, then you can type the parent category next to the ‘Limit taxonomy switch for child terms of a specific parent’ option. This way, only the parent category will be switched to a taxonomy.

Here, you will see a prompt asking you to activate the redirection manager. Go ahead and click the ‘Activate Redirects’ button.

Activate AIOSEO Redirects

Next, simply add the IDs for all the categories that you want to convert into a specific taxonomy. Keep in mind that if you add more than one category ID, then you will have to separate them using commas.

Type category IDs in the field

However, you can also create custom taxonomies with WordPress, which can be used with existing or custom post types.

As your WordPress blog grows, you might need to convert your categories into a custom taxonomy because it can be overwhelming to file and keep track of each post in a category with different subcategories.

For more instructions, see our tutorial on how to find category IDs in WordPress.

Attain category ID

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 style individual categories differently in WordPress and our expert picks for the best conditional logic plugins for WordPress.

Here, you will notice that the category you switched to taxonomy is now displayed in the block panel on the right corner of the screen. From here, you can now easily add new terms or use existing ones for your WordPress blog post.

Custom taxonomy preview

How to Set Up Redirects From Category to Custom Taxonomy

Using custom taxonomies for tagging allows for more accurate and detailed classifications and better content organization.

The category edit URL will now appear in a popup box at the bottom left corner of your screen.

Finally, click the ‘Add Redirect’ button in the right corner.

Choose 301 as the redirect type

However, by creating a custom taxonomy for each of these topics, you can make content organization easier.

Upon clicking on the custom taxonomy, you will be taken to a new page, where you can easily add terms for the taxonomy by typing in a name and slug.

Add a term to the dietary restrictions taxonomy

Next, make sure that ‘301 Moved Permanently’ is chosen as the redirect option from the dropdown menu.

Next, select the custom taxonomy that you want the categories to turn into from the ‘Taxonomy to switch to’ dropdown menu.

Some of the categories in WordPress also have subcategories (child categories).

However, we recommend using this method only if you don’t want to use categories at all.

Finally, click the ‘Switch Taxonomy’ button to convert your WordPress category to a custom taxonomy.

Type parent category

Once you are there, you need to select the ‘Categories’ option from the ‘Taxonomy to switch from’ dropdown menu.

To find a category id, you will need to visit the Posts » Categories page from the WordPress dashboard and hover your mouse over the category of your choice.

Custom taxonomies can also help improve your SEO rankings by giving you the flexibility to use more specific and targeted taxonomy terms.

If you don’t know how to create a custom taxonomy, then you may want to see our tutorial on how to create a custom taxonomy in WordPress.

Choose your custom taxonomy from the dropdown menu

Do you want to convert your WordPress categories into custom taxonomies?

A taxonomy allows you to organize groups of posts and custom post types on your WordPress website. By default, WordPress comes with two pre-made taxonomies: categories and tags.

In this article, we will show you how to easily convert WordPress categories to custom taxonomies.

Converting WordPress categories to custom taxonomies

Why and When Do You Need to Convert Categories into Custom Taxonomies?

AIOSEO is the best WordPress SEO plugin on the market. It comes with a powerful redirection manager addon that makes it very easy to find broken links and fix them using 301 redirections.

Once you have found the IDs for categories, head back to the ‘Taxonomy Switcher’ page.

Categories are one of the two default taxonomies that help you sort your content. WordPress also allows you to create and use custom taxonomies.

Once you do that, click the gear icon in the field to open some additional settings for the source URL. From here, check the ‘Regex’ option.

For example, if you have a category for dietary restrictions and you want to switch to a taxonomy of the same name, then you can select the ‘Dietary Restrictions’ option from the dropdown menu.

Having said that, let’s take a look at how you can easily convert categories into custom taxonomies.

How to Convert WordPress Categories to Custom Taxonomies

This redirect will now send all your category archive traffic to your custom taxonomy.

Upon creation, the redirect you created will be displayed at the bottom of the page.

Once you have done that, head over to the All in One SEO » Redirects page from the WordPress admin sidebar.

From here, you can easily find your category ID, as it is the number that comes after ‘category&tag_ID=’ and before ‘&post_type’ in the URL.

Upon activation, you will need to configure AIOSEO for your website. For more detailed instructions, please refer to our guide on how to set up All in One SEO correctly.

From here, you can always toggle the switch to ‘Inactive’ if you want to disable it.

Disable the redirect by toggling the switch

To fix this, you need to redirect users to the new taxonomy page for each category.

Upon activation, head over to the Tools » Taxonomy Switcher page from the WordPress admin sidebar to convert categories to custom taxonomies.

After you turn one of your categories into a custom taxonomy, the category archive page will now show a 404 error. This is nothing to be worried about if your website is not live yet.

However, if your website is live, then search engines may have already crawled your category pages and indexed them. This means that those pages can appear in search results, and users coming from search engines will see a 404 error page.

If you want to convert all the categories on your WordPress site into this specific custom taxonomy, then simply click the ‘Switch Taxonomies’ button.

You will now see the taxonomy that you have created along with the default taxonomies in the Posts menu tab in the WordPress sidebar.

After that, enter your custom taxonomy slug, e.g. /dietary_restrictions/1 into the ‘Target URL’ field.

Add the source and target URL

To do this, you will need to install and activate the All in One SEO for WordPress plugin. For more details, see our beginner’s guide on how to install a WordPress plugin.

All in One SEO

For example, if you have a recipe website, then creating categories for cuisine type, dietary restrictions, and meal type can be a bit confusing.

Preview of categories and subcategories

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

If you want to redirect individual categories to a custom taxonomy page, then you may want to see our beginner’s guide on setting up redirects in WordPress.