Do you need to convert your WordPress categories to custom taxonomies? Classes are one of many two default taxonomies that allow you to kind your content material. Nevertheless, WordPress additionally means that you can create and use customized taxonomies. On this article, we’ll present you how you can simply convert WordPress categories to custom taxonomies.
Why and When Do You Have to Convert Categories to Custom Taxonomies
Classes and tags are the 2 default taxonomies in WordPress. Taxonomies are used to kind and arrange content material into completely different subjects.
Other than the default taxonomies, WordPress additionally means that you can create customized taxonomies which you should utilize with current publish varieties or with customized publish varieties. For extra on this subject, see our article on when do you want a customized publish sort or taxonomy in WordPress.
As your web site develop, you may discover a must convert your classes right into a customized taxonomy. For instance, let’s say that you’ve a class referred to as subjects with numerous sub-categories. It will be time-consuming to edit every publish and file it beneath your new customized taxonomy.
Wouldn’t it’s good in the event you may bulk convert some or your whole classes to the brand new customized taxonomy?
Let’s check out how one can simply convert classes to customized taxonomies with out manually enhancing every publish.
Changing WordPress Categories to Custom Taxonomies
Very first thing you could do is set up and activate Taxonomy Switcher plugin. For extra particulars, see our step-by-step information on how you can set up a WordPress plugin.
Upon activation, you could go to Instruments » Taxonomy Switcher web page in your WordPress admin space to transform categories to custom taxonomies.
On this web page, you’ll be able to choose the taxonomies you need to convert. For this tutorial, we’ll choose ‘Classes’ because the taxonomy we need to change from, and ‘Subjects’ because the customized taxonomy we need to change to.
If you wish to convert all classes to a customized taxonomy, then you’ll be able to go forward and click on on the ‘Change Taxonomies’ button.
The plugin will convert all classes to your chosen customized taxonomy. You will note successful message like this:
In the event you simply need to convert particular classes, then you have to so as to add the IDs of these classes subsequent to ‘Comma separated listing of time period ids to modify’ discipline. See our article on how you can discover class IDs in WordPress for extra particulars.
Moreover, if you wish to skip baby classes of a particular class, then you’ll be able to add the IDs of the dad or mum class subsequent to ‘Restrict taxonomy change for baby phrases of a particular dad or mum’ possibility.
Don’t overlook to click on on the ‘Change Taxonomy’ button to avoid wasting your adjustments.
Setting Up Redirects from Class to Customized Taxonomy
After you turn classes to a customized taxonomy, the class archive web page will now present a 404 error web page. That is nothing to be nervous about in case your web site shouldn’t be stay but.
Nevertheless in case your web site is stay, then engines like google might have already crawled your class pages and listed them. Which means these pages can seem in search outcomes and customers coming from engines like google will see a 404 error web page.
To repair this, you could redirect customers to the brand new taxonomy web page for every class.
Fortunately, there may be a straightforward repair for that.
First, you have to to put in and activate the Redirection plugin. For extra particulars, see our step-by-step information on how you can set up a WordPress plugin.
Upon activation, you could go to Instruments » Redirection web page. Within the Supply URL discipline, you could enter /class/.* and within the Goal URL discipline you could enter your customized taxonomy slug, e.g. /subject/$1
Subsequent, you want examine the field subsequent to ‘Regex’ possibility, after which click on on ‘Add Redirect’ button.
This redirect will now ship all class archive site visitors to your customized taxonomy. Solely use this, in the event you don’t need to use classes in any respect.
If you wish to redirect particular person classes to a customized taxonomy web page, then see our newbie’s information on establishing redirects in WordPress with detailed step-by-step directions.
You May Also Like : How to Upload a HTML Page to WordPress without 404 Errors
We hope this text helped you discover ways to convert WordPress categories to custom taxonomies. You may additionally need to see our information on how you can model particular person classes in a different way in WordPress to model your customized taxonomy templates.
If you liked this article, make sure to hit the bell for getting our latest updates and share this article with your friends in every social media platforms.