Home › Forums › Backend Issues (wp-admin) › remove_meta_box not working for 'normal' › Reply To: remove_meta_box not working for 'normal'
Why are you trying to remove the acf fields using remove_meta_box
? A better way to do this would be to add a filter when ACF gets the field group and to alter the location rules so that it’s not shown if your setting says to hide it.
add_filter('acf/get_field_group', 'my_alter_field_group');
function my_alter_field_group($group) {
// alter location rules
return $group;
}
To see what the location rules should be and how to alter them, output a field group to code and take a look at the location argument array.
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.