Home › Forums › Backend Issues (wp-admin) › Alter field group settings per content type › Reply To: Alter field group settings per content type
Thank you again John. I’m not quite sure how/where to use the code you mentioned above. I tried replacing the other hook with this one:
function toind_alter_flexible_content( $field_group ) {
//var_dump( $GLOBALS['post_type'] );
if ( 'group_5c76d2e8213cf' === $field_group['key'] && 'event' == $GLOBALS['post_type'] ) {
$field_group['menu_order'] = 7;
$field_group['position'] = 'normal';
}
return $field_group;
}
add_filter( 'acf/validate_field_group', 'toind_alter_flexible_content' );
Which is not what you showed above, but I don’t understand where I would put that code that you showed and how I would work my alteration into the process.
The code above did get hit, but once again, no change in the position of the field group on the edit screen.
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.