Home › Forums › Backend Issues (wp-admin) › Missing field inputs on new instance of wordpress
I maintain a wordpress plugin in which we use ACF to add optional fields to the edit page for every post. In production (wordpress 5.4.2), this is working as expected.
When testing this in a new local wordpress instance (5.7.2, with the Classic Editor plugin to bypass Gutenburg), the entire “acf-input” section is missing including the add button for each field.
This is the hook being called to load the fields:
acf_add_local_field_group(
array(
'key' => 'group_d5a22594839cd',
'title' => 'Field group title here',
'fields' => array(
array(
'key' => 'field_496edd4619978',
'label' => 'Article',
'name' => 'plugin_prefix_article',
'type' => 'flexible_content',
'instructions' => 'Field instructions here',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'layouts' => array(/* removed layouts for verbosity sake */),
'button_label' => 'Add Article',
'min' => '',
'max' => '',
),
array(
'key' => 'field_55f0cfc948b46',
'label' => 'Product',
'name' => 'plugin_prefix_product',
'type' => 'flexible_content',
'instructions' => 'Field instructions here',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'layouts' => array(/* removed layouts for verbosity sake */),
'button_label' => 'Add Product',
'min' => '',
'max' => '',
),
),
'location' => array(
array(
array(
'param' => 'post_type',
'operator' => '==',
'value' => 'post',
),
),
),
'menu_order' => 10,
'position' => 'normal',
'style' => 'default',
'label_placement' => 'top',
'instruction_placement' => 'label',
'hide_on_screen' => '',
'active' => true,
'description' => 'Field group description here',
)
);
This feels like I’m missing something very basic, but I genuinely don’t know what it is.
I have found the issue, it seems the production site is using ACF Pro, and when I swap that out for the ACF plugin, my inputs work as expected.
I have no idea why this is the case. ¯\_(ツ)_/¯
You must be logged in to reply to this topic.
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!
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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.