Convert some categories to a custom taxonomy

Category and Tag are two default WordPress taxonomies which help you to group posts together easily.
Assuming you have these categories:

  • Category A
    • Subcategory 1a
    • Subcategory 2a
  • Category B
    • Subcategory 1b
    • Subcategory 2b
    • Subcategory 3b

and want to convert Category B and its child categories to a new taxonomy.

I. Register a new taxonomy

First, you need to register a new taxonomy, using the register_taxonomy() function, or using another plugin (Custom Post Type UI, Toolset Types, etc.).

II. Convert category to new taxonomy

There are 2 possible ways to convert:

  1. Convert automatically
    Please install and use this plugin Taxonomy Switcher.
  2. Convert manually
    Please follow below steps:
  • Add terms to the new taxonomy

    Add Subcategory 1b, Subcategory 2b, Subcategory 3b to new taxonomy CVP - add a new term to WordPress taxonomy

  • Move posts from a child category to new taxonomy term

    The quickest way is:

    + In WordPress admin Posts page, select a specific category (for example: Subcategory 1b), then click “Filter” button to show all matching posts: CVP - filter by category in Posts page

    + Select the top checkbox, select the “Edit” option in the “Bulk Actions” dropdown, then click “Apply” button:
    CVP - bulk actions edit posts WordPress

    + Select the desired term of the new taxonomy:

    CVP - bulk update categories of WordPress posts

    then click the “Update” button.

    Repeat this step for each child category.

  • Remove child categories (optionally)

    After above steps, you might remove child categories which are already replaced by new taxonomy.

Best regards,