Home › Forums › ACF PRO › Bidirectional Relationships and multiple post types › Reply To: Bidirectional Relationships and multiple post types
You could probably use an acf/load_field filter https://www.advancedcustomfields.com/resources/acf-load_field/, check the post to see what post type it is and then alter the settings of the field to filter by a specific post type. It could be complicated figuring out what post type the field is being loaded for and I’m not sure of all the details.
I probably would not do that much work and I’d use two different fields, one on each post type, with the correct settings.
The first way would be more elegant, but the second would be easier to do, take less code, be faster to accomplish and be easier to maintain in the future
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
🚨 The 2023 ACF Annual Survey closes tomorrow! This is your last chance to complete the survey and help guide the evolution of ACF. https://t.co/0cgr9ZFOJ5— Advanced Custom Fields (@wp_acf) May 18, 2023
© 2023 Advanced Custom Fields.