Support

Account

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.