This is the structure for an Advanced Custom Field, the one that works for me:
if( function_exists('acf_add_local_field_group') ):
acf_add_local_field_group(array(
'key' => 'group_5e49f5acce604',
'title' => 'Testing URL',
'fields' => array(
array(
'key' => 'field_5e49f5b2115e7',
'label' => 'Testing URL',
'name' => 'testing_url',
'type' => 'url',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'default_value' => '',
'placeholder' => '',
),
),
'location' => array(
array(
array(
'param' => 'post_type',
'operator' => '==',
'value' => 'solutions',
),
),
),
'menu_order' => 0,
'position' => 'normal',
'style' => 'default',
'label_placement' => 'top',
'instruction_placement' => 'label',
'hide_on_screen' => '',
'active' => true,
'description' => '',
));
endif;
And this is the structure for the sub-field that I need to use:
"layout_5cf4481288429": {
"key": "layout_5cf4481288429",
"name": "software_update_row",
"label": "Parallax Background White Box Row",
"display": "row",
"sub_fields": [
{
"key": "field_5e3bae0c1f677",
"label": "URL Redirection",
"name": "url_redirection_gravity",
"type": "url",
"instructions": "Choose which form you want to use",
"required": 0,
"conditional_logic": [
[
{
"field": "field_5e3b61c3789b8",
"operator": "!=",
"value": "1"
}
]
],
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": ""
}
]