Home › Forums › ACF PRO › Relationship › Reply To: Relationship
Surely! Yes, I meant left – sorry! That’s what happens when I answer right before bed.
And here’s the export code for both of the relationships shown above.
if( function_exists('register_field_group') ):
register_field_group(array (
'key' => 'group_53c93c1a57b90',
'title' => 'Bios Join',
'fields' => array (
array (
'key' => 'field_535ad94b471e0',
'label' => 'Bios',
'name' => 'bios',
'prefix' => '',
'type' => 'relationship',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'post_type' => array (
0 => 'team_bio',
),
'taxonomy' => '',
'filters' => array (
0 => 'search',
),
'elements' => '',
'max' => '',
'return_format' => 'object',
),
),
'location' => array (
array (
array (
'param' => 'post_type',
'operator' => '==',
'value' => 'page',
),
),
),
'menu_order' => 0,
'position' => 'normal',
'style' => 'seamless',
'label_placement' => 'top',
'instruction_placement' => 'label',
'hide_on_screen' => '',
));
register_field_group(array (
'key' => 'group_53c982b23a920',
'title' => 'Page Blocks Join',
'fields' => array (
array (
'key' => 'field_53c982bbe7eab',
'label' => 'Page Blocks',
'name' => 'page_blocks',
'prefix' => '',
'type' => 'relationship',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'post_type' => array (
0 => 'pageblock',
),
'taxonomy' => '',
'filters' => array (
0 => 'search',
),
'elements' => '',
'max' => '',
'return_format' => 'object',
),
),
'location' => array (
array (
array (
'param' => 'post_type',
'operator' => '==',
'value' => 'page',
),
),
array (
array (
'param' => 'post_type',
'operator' => '==',
'value' => 'team_bio',
),
),
),
'menu_order' => 0,
'position' => 'normal',
'style' => 'seamless',
'label_placement' => 'top',
'instruction_placement' => 'label',
'hide_on_screen' => '',
));
endif;
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!
🚀 This week’s session of ACF Chat Fridays dips into the preliminary results of our first ever user survey. Don’t miss it! https://t.co/3UtvQbDwNm pic.twitter.com/kMwhaJTkZc
— Advanced Custom Fields (@wp_acf) May 9, 2023
© 2023 Advanced Custom Fields.
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.