Jun Rung
Jun Rung

Reputation: 31

How to add child category to multiple Parent category in Wordpress

Wordpress Expert,

I need to add "child" categories to multiple parents category.

For Example: These are two Parents categories: National Flowers, National Animals

Whereas These are five child categories: japan, china, england, denmark, usa

Now i want to add child categories to both of them parent categories when write post. Like this way

National Flowers
 Japan
 china
 England
 Denmark
 USA

National Animals
 Japan
 china
 England
 Denmark
 USA

Note: I don't want to create multiple child category...means the same child category like "japan" should be used in any parent category...I dont want to create double "japan" category.

In simple words: Once i create any child category, then it should be able to add it in multiple parent categories like the the above structure where "japan" assigned to multiple category. Thanks and hope to see any expert here with plugin or code.

Upvotes: 1

Views: 1560

Answers (1)

jrswgtr
jrswgtr

Reputation: 2379

Short answer: Not possible. Taxonomy terms are 'hierarchical' by design.

The database table for terms (wp_term_taxonomy) has just one column available for parent term. There is no many-to-many relationship possible, unless you create your own table.

enter image description here

Upvotes: 1

Related Questions