WordPress.org

Ready to get started?Download WordPress

Forums

Connect two Custom Post Types (6 posts)

  1. mosabua
    Member
    Posted 2 years ago #

    Hi

    I have the following problem: I have two CPT named Company and Person and now I want to make a connection between them.

    So basically I would like to have a selection list of all companies in the person cpt-admin - perfectly with multiple select (if a person works for more companies - e.g. freelancers)

    And then on the frontpage I can go to a company page and show all persons working for that company.

    thanks werner

  2. mosabua
    Member
    Posted 2 years ago #

    Does no one have a clue on this one?

  3. Roy
    Member
    Posted 2 years ago #

    No, but perhaps you shouldn't have made two custom poste types, but one custom post type and a custom taxonomy. That way it will work like categories and tags in combination with normal posts.

  4. mosabua
    Member
    Posted 2 years ago #

    The problem is that I have plenty of custom fields on both custom post types, otherwise the taxonomy would be fine ...

  5. fonglh
    Member
    Posted 2 years ago #

    you could store the link info in a custom field too. but you'll have to code your own metabox and your own loop to display it in the format you need.

  6. mosabua
    Member
    Posted 2 years ago #

    Found a plugin named Posts2Posts which makes the linking possible

Topic Closed

This topic has been closed to new replies.

About this Topic