Home › Forums › Backend Issues (wp-admin) › Overwrite acf_add_local_field_group › Reply To: Overwrite acf_add_local_field_group
If it were me I would alter the function you posted to set up the field group args, then add a call to a filter to allow modification in the child themes functions.php file and then call acf_add_local_field_group();
function () {
$args = array(/*field group settings*/);
apply_filters('my-theme-name-my-field-group-name', $args);
acf_add_local_field_group($args);
}
then in the child them you can add
add_filter('my-theme-name-my-field-group-name', 'child_theme_function', 10, 1);
function child_theme_function($args) {
// modify args
return $args;
}
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.