Support

Account

Home Forums ACF PRO PRO includes with issues at 5.3.2

Solved

PRO includes with issues at 5.3.2

  • Hi,

    with the update from 5.3.1 to 5.3.2 you changed the way to include the pro fields (repeater, flex, …).

    I developed own fields based on your great flex and repeater field. All my fields are based inside my theme folder and i just include them. it is important, that the original pro fields are initialized before i include my own fields, cause i youse the original classes for my own fields.
    with 5.3.2 it seems, that the intializing of the pro fields has changed! the fields/classes are not initialized before i include my own fields.

    //ONLY adding these three lines of your acf-pro.php helps at the moment
    acf_include(‘pro/fields/repeater.php’);
    acf_include(‘pro/fields/flexible-content.php’);
    acf_include(‘pro/fields/gallery.php’);

    //now i am including my own fields
    include_once(get_stylesheet_directory().’/_acf/individole-configs-cpt.php’);
    include_once(get_stylesheet_directory().’/_acf/individole-configs-all-posts.php’);
    include_once(get_stylesheet_directory().’/_acf/individole-configs.php’);

    .dennis

  • Hi @dennis

    Please use the action acf/include_field_types to include any custom field types.
    This action will allow you to safely include field types after ACF has done so.

    
    add_action('include_field_types', 'my_include_field_types', 20);
    
    function my_include_field_types() {
    	
    	include_once(get_stylesheet_directory().’/_acf/individole-configs-cpt.php’);
    	include_once(get_stylesheet_directory().’/_acf/individole-configs-all-posts.php’);
    	include_once(get_stylesheet_directory().’/_acf/individole-configs.php’);
    	
    }
    
  • hi elliot,

    thanks for this. it “almost” works. it has to be:

    add_action('acf/include_field_types', 'my_include_field_types', 20);

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘PRO includes with issues at 5.3.2’ is closed to new replies.