How to import categories and subcategories?

Closed

Import WP Addon - WooCommerce Updated 8 months ago 4 Replies

Andreas asked 9 months ago on September 2, 2023 at 8:50 pm

In my import csv there’s a column “category” and another one “subcategory”. How to import them so they will get imported hierarchically?

J

James replied Support Agent

9 months ago on September 3, 2023 at 7:57 pm

Hi,

If you enable the hierarchy in the terms settings, then set the "category > sub category" values replacing the ">" with the set hierarchy character.

https://www.importwp.com/docs/how-to-import-wordpress-taxonomies-onto-a-post-type/

AS

Andreas replied

8 months ago on September 5, 2023 at 8:47 am

thank you.
So there's no way to import the categories with a csv in 2 columns?
top level category: category name
sub category: subcategory name

?
Thank you

J

James replied Support Agent

8 months ago on September 5, 2023 at 10:33 am

yes you can add more than 1 column to a field, so you can create the hierarchy, e.g. (replace the category names with the correct column numbers):

{category} > {subcategory}

and set the hierarchy character to: >

AS

Andreas replied

8 months ago on September 5, 2023 at 11:30 am

Thank you!