Reputation: 31
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
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.
Upvotes: 1