WordPress Website Hosting - How to Convert WordPress Categories to Custom Taxonomies?
Are you looking to convert the WordPress categories into the custom taxonomies? Categories are one of the two taxonomies which helps in setting out the content. Here the WordPress in wordpress website hosting will be allowed to create and thus use the custom taxonomies. Here it will be shown to you on how to easily convert the WordPress categories into the custom taxonomies.
When it is required to convert the categories to custom taxonomies?
There are two default taxonomies in WordPress one is the category and the other is the tag. Here the taxonomies are used for sorting out as well as organize the content into different topics. Apart from the default taxonomies, the WordPress also allows in creating the custom taxonomies which can be used with the existing post types.
When you see your wordpress website grow you will be required to convert the categories into a custom taxonomy. Suppose if you are having a category called as topics here with a lot of sub categories. Hence it would take a lot of time for editing each post as well as file which is under the new custom taxonomy. Will it not be nice if you are able to bulk convert some or all the categories for a new custom taxonomy?
Process of Converting WordPress Categories to Custom Taxonomies
The first and the foremost thing you need to consider is to install as well as activate the taxonomy switcher plugin. Once it has been activated you need to visit Tools » Taxonomy Switcher page in the WordPress admin are for converting the categories to custom taxonomies.
Here on this page you will be able to select the taxonomies you would like to convert. Here we will be selecting the category as taxonomy which we would like to switch from, and the ‘Topics’ as the custom taxonomy we would like to switch to.
If you are looking to convert all the categories into a custom taxonomy, then one can go ahead and then click on the ‘Switch Taxonomies’ button.
This plugin would be converting all the categories to the selected custom taxonomy. You will be able to see the success message as it is shown below:
If you have been looking to convert a specific category then you will be required to add the IDs of the categories which is next to Comma separated list of term ids to 'switch’ field.
Moreover if you are looking to skip child categories of the specific category, then you will be able to add the IDs of the parent category which is next to the ‘Limit taxonomy switch for child terms of a specific parent’ option. Here one should never forget to click on the ‘Switch Taxonomy’ button for saving the changes.
Setting Up of Redirects from Category to Custom Taxonomy
Once you have switched the categories to a custom taxonomy, the category archieve page will be showing the 404 error page. In this case there is nothing to be worried if the website is not live. However if the website gets live then the search engine might have already crawled the category pages and have indexed them. This would mean that those pages would already have been appeared in the search results and the users that have been coming from the search engine will be able to see a 404 error page.
For fixing this issue you will be required to redirect the users to the new taxonomy page for each category.
First and foremost thing you will be required is to install as well as activate the Redirection plugins. Once the activation is completed you will be required to visit Tools>>Redirection page. Here in the source URL field you'll be required to enter /category/.* and in the target URL field you will be needed to enter the custom taxonomy slug.
Now you will be required to check the box which is next to the ‘Regex’ option and then you need to click on the Add Redirect’ button. This will now be sending all category archive traffic to the custom taxonomy. You need to use this if you are not looking to use this categories at all.