Support

Account

Home Forums Backend Issues (wp-admin) No add/edit options in dashboard

Solved

No add/edit options in dashboard

  • I have inherited a site and I need to add an entry on the options page. The problem is there’s no way to do this through the dashboard. The existing options are listed but no facility to add a new one. I’ve checked in functions.php and this includes an ACF setup file acf-theme-setup.php. This setup up file creates all the fields eg.

    if(function_exists("register_field_group"))
    {
    	register_field_group(array (
    		'id' => 'acf_social-media-accounts',
    		'title' => 'Social Media Accounts',
    		'fields' => array (
    			array (
    				'key' => 'field_5319bc22ab25d',
    				'label' => 'Facebook',
    				'name' => 'facebook',
    				'type' => 'text',
    				'default_value' => '',
    				'placeholder' => '',
    				'prepend' => '',
    				'append' => '',
    				'formatting' => 'none',
    				'maxlength' => '',
    			),

    I’m not entirely sure how this has been setup. I’m guessing the fields have been exported from ACF. How would I go about working with this and adding a new field?

    Any advice much appreciated.

  • You have 2 choices

    1) manually create a new field in the fields array portion of the code.

    If the field is similar to one of the existing fields you can just to a copy and paste then change the things that need to be different. Note that when you do this the “key” value must be unique, it should start with “field_” and can be up to 63 characters long.

    You can also create what you want to add using the ACF interface, do an export to PHP and copy only the field array that you want to add to the fields array.

    2) You can completely recreate the field group using ACF, using the same field names listed in the code. Then delete the existing field group from the code.

    3) You could also to a combo, create a new field group and export the code to replace the existing code with.

    I’d probably to the first one. an way you look at it, if this is a theme that is supposed to allow updating, unless you can create a child theme, you won’t be able to update it.

  • Thank you!
    I was looking at option 1 but I wasn’t sure if it was ok to make up your own field keys.

    All sorted now, thanks

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

The topic ‘No add/edit options in dashboard’ is closed to new replies.