Support

Account

Home Forums ACF PRO Relationship Reply To: Relationship

  • Surely! Yes, I meant left – sorry! That’s what happens when I answer right before bed.

    No Matches Found

    Search showing Results

    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;