Support

Account

Home Forums Backend Issues (wp-admin) ACF fields no longer under Field Groups. Reply To: ACF fields no longer under Field Groups.

  • I guess it could depend on when you’re adding the field group. Here is the first part of the function that ultimately gets called when you add a local field group using PHP

    
    	/*
    	*  add_field_group
    	*
    	*  This function will add a $field group to the local placeholder
    	*
    	*  @type	function
    	*  @date	10/03/2014
    	*  @since	5.0.0
    	*
    	*  @param	$field_group (array)
    	*  @return	n/a
    	*/
    	
    	function add_field_group( $field_group ) {
    		
    		// validate
    		$field_group = acf_get_valid_field_group($field_group);
    		
    		
    		// don't allow overrides
    		if( $this->is_field_group($field_group['key']) ) return;
    

    As you can see, the second thing that it does is to see if the field group key already exists, if it does it does not include the field group. The field groups in the DB would normally already be created if you added fields in the theme, so the PHP version is ignored. This has been the case since the introduction of the function acf_add_local_field_group() or before.

    This also makes it impossible to test whether or not the PHP field groups are actually working or not. The only way to do that on the site the groups are built on is to, at a minimum, put them in the trash.