Support

Account

Home Forums Gutenberg ACF Blocks – Need stable id Reply To: ACF Blocks – Need stable id

  • Still unfortunately not working. Here is my filter code:

    add_filter(
        'acf/pre_save_block',
        function( $attributes ) {
    
            error_log( print_r( $attributes, true ) );
    
            if ( empty( $attributes['data']['clb-custom-anchor'] ) ) {
                $attributes['data']['clb-custom-anchor'] = 'acf-block-' . uniqid();
            }
    
            return $attributes;
        }
    );

    Here is a very short video to explain what is happening:
    https://www.dropbox.com/s/locxy298szdvik0/Blocky%20-%20ACF%202.0%20Blocks%20Not%20Working.mov?dl=0

    I really appreciate your help here! Thank you!