WordPress.org

Ideas

Allow Child Category To Have Multiple Parents

  1. dsdmdesign
    Member

    I'm trying to find a way to work around this issue with the tools I have. I'm creating a web magazine that will have various credits given to a custom taxonomy called "contributors". However, some of these contributors belong to multiple groups/organizations. I would like to be able to list these organizations as contributors, and add other contributors as children of all the organizations they belong to. Is there any way I can achieve this?

    Posted: 2 years ago #
  2. Luke Gedeon
    Member

    Probably a couple months from a solution on this, but should not require any changes to core.

    Posted: 2 years ago #
  3. landwire
    Member

    12345

    Hey Luke,
    not sure if this is still an issue, but could you post your solution if you have come to one?
    Thanks,
    Sascha

    Posted: 1 year ago #
  4. phoenix_maximus
    Member

    Hello, I too am curious to see how this can be handled...have a site that could certainly use it. Any updates?

    Posted: 1 year ago #
  5. Willa McDonald
    Member

    This still hasn't been done? I'm desperate to link to multiple parents...

    Posted: 6 months ago #
  6. tazo todua
    Member

    maybe not additional Database rows, but there should be an ARRAY of parent IDs, instead of single parent ID.

    Posted: 1 month ago #
  7. Binh
    Member

    12345

    OH!!!! That's brillient idea Tazo!

    Posted: 1 month ago #
  8. Mohammad Ghodrati
    Member

    12345

    It's an important, rational feature for custom taxonomies.

    I have a custom taxonomy named "science" for categorizing different branches of science. In this context, it's highly required to have multiple parent categories. For example, "Psychology" mainly is a child of "Social sciences". But "Medicine" as a "Profession", also has its branch of psychology, called "Clinical psychology". In addition, "Clinical psychology" is not a different taxonomy from those named! It's just a "science" like it's parents. Therefore, "Clinical psychology" must be a child of both "Psychology" and "Medicine".

    Yet, I'm using an additional table as "taxonomy meta" and adding "_children" row for each category that should have "Adopted Children". But I think, it's a huge implementation if you provide this feature.

    Posted: 1 week ago #
  9. Luke Gedeon
    Member

    Well two months turned into two years, but I have finally had a chance to come back to this.

    https://github.com/lgedeon/term-meta

    We have built a plugin that adds term-meta to any taxonomy. Which makes it possible to create a meta called "parent" or maybe, depending on how you are doing your query, "child".

    This is essentially an early plugin version of what is coming in core. I would appreciate any developer help in getting the UI and default queries right.

    For now, to use for multiple parents use case, you are going to have to write your own query to output things the way you want them. You may also want to add your own custom fields since the default UI looks a lot like post-meta's Custom Field box. https://codex.wordpress.org/Custom_Fields#Usage

    If you are writing code using this please stay in touch. I hope to make this a lot better now that I have projects dependent on it. We can build this together.

    Posted: 1 week ago #
  10. Ipstenu (Mika Epstein)
    Administrator

    You MAY want to double back since we just switched over to term splitting... Which I presume is what you meant by "what is coming in core"

    https://github.com/johnjamesjacoby/wp-term-meta

    That may be a great starting point. JJJ is a term savant.

    Posted: 1 week ago #

RSS feed for this topic

Reply »

You must log in to post.

  • Rating

    12345
    18 Votes
  • Status

    This is plugin territory