admin管理员组

文章数量:1327308

I have list of products and associated product categories. I like to clone same terms and their hierarchy along with product association to a newly created custom taxonomy.

I have list of products and associated product categories. I like to clone same terms and their hierarchy along with product association to a newly created custom taxonomy.

Share Improve this question asked Aug 7, 2020 at 12:14 MMKMMK 5384 silver badges11 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

Could you not just keep the same taxonomy and declare it on both CPTs?? That way both would inherit the same terms, at the same IDs, which would allow you to get posts from both CPTs if required.

At your CPT creation, you can tell it which Taxonomies to use by setting a parameter of:

'taxonomies' => [ 'your-tax-slug' ],

本文标签: Clone Terms of one taxonomy to another