skip to Main Content

Bonjour!

I’m stuck when it’s come to create a relationship between custom posts based on any or several ACF fields.

I have a Custom post type called ‘Exposition’ and another one called ‘artist’

In a single post, I would like to highlight the artist associated with this ‘exposition’
and put some extra info based on ‘artist’ fields

I tried with post-2-post but I can’t figure this out, I’m quite new to PHP :)!

Can you help me!

Thanks in advance

regards,

Victor

2

Answers


  1. Chosen as BEST ANSWER

    Thank you Mohamed I was quite busy these last days I tried your solution and it worked like a charm Thank you for your reactivty

    Victor


  2. welcome to Stackoverflow, your issue can be fixed by creating a Post Object Field with ACF to each of the post types and configure the field to load the list of posts of the custom post type that you want to link to the current post type.

    Follow this page for instructions:
    https://www.advancedcustomfields.com/resources/post-object/

    There is also the Post Relationship fields that can help you on what you’re looking for:
    https://www.advancedcustomfields.com/resources/relationship/

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search