Support

Account

Home Forums ACF PRO Relationship field inherit terms of custom Taxonomy

Solving

Relationship field inherit terms of custom Taxonomy

    • Marc

    • June 2, 2020 at 11:24 pm

    Hello,

    With CPT UI I created 3 kinds of CPT :
    Sports Clubs
    Sports Practices
    Sports Installations
    also with CPT UI I created a custom taxonomy “Sports” I linked with all these 3 CPT
    terms of Sports are Tennis, Yoga, Football, Badminton, etc.
    Several Sport Practices propose some Sport, each Sport Practice is unique with a certain correspondant phone# etc and is practiced in a unique location (Sport Installations) and proposed by a certain Sport Club.

    So you can have several practices in a Sport Club, several Practices proposed by a Club several Practices in an installation (e.g a swimming pool) but a certain Practice is proposed for only one Club in only one Sport Installation.

    I created group of fields for each CPT an bidirectional relationship fields.
    Then I use Elementor , Dynamic addon with relationship and sections templates to build my website, researches, filters, facets, etc.

    I did some additional coding for filtering what happens in relationship metabox in admin.

    It works fine.

    It could work finer using taxonomy terms for filtering purposes.

    I added taxonomy fields in each group for each CPT and synced with ‘Sports’ taxonomy .
    Some are one choice (sports practices) some are multiple (Clubs, Installations).
    I added also a taxonomy field using three tags : adults, children, all ages
    (I could create an additional taxonomy but I did not)

    Is there a way to automatically get a term in CPT relateds.

    Example :
    I have a Yoga practice for children (term Yoga tag children)
    I have a Yoga practice for adults (term Yoga tag adults)
    I have a Water-Polo practice for adults (term Water-Polo tag adults)

    When I edit CPT “Club ABC)
    I choose these 3 practices in relationship fields and Club ABC will have automatically terms Yoga and Water-Polo and tags adults and children.

    Same when a Sport Installation CPT will be related with one ore more practices.

    I will first edit practices and put a Sports term and a “age” tag because for each it is unique and I would like from there populate Clubs and Installations.
    So the fields clubs <=> practices and installations <=> practices are involved.

    I hope my explanations are clear.

    Thanks for any help.

  • Out of curiosity Marc, have you found a resolve? I am in the same scenario but with different products.

  • I am having a similar issue, but just a little different. I have a search filter that can look into the acf fields for the taxonomies, so I made taxonomy fields in ACF and matched the name with my term names for WordPress. But when I input tags and categories into the boxes provided by WordPress, they do not show in the fields I created with ACF. But, if I first put them in the ACF field, they then show in the WordPress one. I am using the ACF taxonomy field. Is there a way to make that bidirectional so they both show in both spots? I have the post 2 post plugin for bidirectional, but it doesn’t seem to work with taxonomies.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.