Home › Forums › Backend Issues (wp-admin) › Overwrite acf_add_local_field_group › Reply To: Overwrite acf_add_local_field_group
Sorry John, it is PHP, in the parent theme there’s a file which is /acf-fields/team.php and in there is:
add_action( 'acf/include_fields', function() {
if ( ! function_exists( 'acf_add_local_field_group' ) ) {
return;
}
acf_add_local_field_group( array(
'key' => 'group_652407356c71f',
'title' => 'Practice Team',
'fields' => array(
-- ALL THE FIELDS HERE --
),
'location' => array(
array(
array(
'param' => 'page',
'operator' => '==',
'value' => '247',
),
),
),
'menu_order' => 0,
'position' => 'acf_after_title',
'style' => 'seamless',
'label_placement' => 'top',
'instruction_placement' => 'label',
'hide_on_screen' => array(
0 => 'the_content',
),
'active' => true,
'description' => '',
'show_in_rest' => 0,
) );
} );
So this is on many sites but on this 1 particular site I need to be able to just add an additional image field to one of my repeaters, so was hoping to overwrite this function in the child themes functions.php without needing to copy the file.
Thanks.
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.