Support

Account

Forum Replies Created

  • I just had the same issue but managed to get it working by wrapping the <Innerblocks /> tag in div tags like this:

    <div><InnerBlocks /></div>

  • To anyone reading this now, DACrosby’s answer still works except you have to wrap the array keys within the $value[] array with quotes (e.g. ‘field_54aa5beb008b1’ )

    
    add_filter('acf/load_value/key=field_54aa5b3b008b0',  'afc_load_my_repeater_value', 10, 3);
    function afc_load_my_repeater_value($value, $post_id, $field) {
    	if ($post_id === false) {
    		$value	= array();
    		$value[] = array(
     
    			'field_54aa5beb008b1'/* Correct */ => 'Hours',
    			field_54aa5c25008b2 /* Incorrect */ => 1
    		);
    	}
    	return $value;
    }
    
Viewing 2 posts - 1 through 2 (of 2 total)