Home Forums ACF PRO Relationship & bi-directional relationship fields in CPT?


Relationship & bi-directional relationship fields in CPT?

  • Here is my current set up:

    3 CPT

    1. Solutions
    2. Service
    3. Company

    4 ACF fields

    1. Related Services (for Solutions CPT)
    2. Related Solutions (for Services CPT)
    3. Company Services (for Company CPT)
    4. Company Solutions (for Company CPT)

    When I create/edit a Solutions page, I am able to select all the services available within that solution. Same for Services page, I am able to select all the related Solutions it falls under. This was originally put together by another developer that probably didn’t know about bidirectional relationship so I left it as is.

    On the companies page, there is a relationship field to Services & Solutions CPT. So as the editor, I would once again have to select the Solution and the individual services for each company as they will all differ.

    Currently there is a major disconnect and a lot of double work as far as having to constantly select Solutions & Services.

    I decided to edit the Solutions and Services CPT so that they use a bidirectional relationship field called “associated with”. So a Solutions can have multiple services, a service can be in multiple Solutions.

    The part I am having a hard time on is somehow connecting that to the Company CPT.

    I’d like to be able to select just the solutions that are available for each Company and have a list of the services associated with that solution be made available for edit. So for instance, a company might have Solution A which has 5 services available but they only offer 4. So they would need to be able to remove 1 w/o it affecting the original Solution & Services bidirectional relationship.

    Is that possible? I’m not sure how to go about doing this.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.