Support

Account

Home Forums Backend Issues (wp-admin) php import code not working

Solving

php import code not working

  • when i use php export code for import acf noting be imported for me

    
    add_action( 'acf/include_fields', function() {
    	if ( ! function_exists( 'acf_add_local_field_group' ) ) {
    		return;
    	}
    
    	acf_add_local_field_group( array(
    		'key' => 'group_640fb15bd3fa4',
    		'title' => 'SEO',
    		'fields' => array(
    			array(
    				'key' => 'field_640fb15c6b2db',
    				'label' => 'SEO TITLE',
    				'name' => 'seo_title',
    				'aria-label' => '',
    				'type' => 'text',
    				'instructions' => '',
    				'required' => 0,
    				'conditional_logic' => 0,
    				'wrapper' => array(
    					'width' => '',
    					'class' => '',
    					'id' => '',
    				),
    				'default_value' => '',
    				'maxlength' => '',
    				'placeholder' => '',
    				'prepend' => '',
    				'append' => '',
    			));
    		'menu_order' => 0,
    		'position' => 'side',
    		'style' => 'default',
    		'label_placement' => 'top',
    		'instruction_placement' => 'label',
    		'hide_on_screen' => '',
    		'active' => true,
    		'description' => '',
    		'show_in_rest' => 0,
    	) );
    } );
    
  • Where are you adding this code?

  • I don’t see any reason that this should not be working.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.