Support

Account

Home Forums Gutenberg Most acf-blocks disappeared with WP 6.1 Reply To: Most acf-blocks disappeared with WP 6.1

  • I have just taken over a site that uses ACF BLOCKS. After updating ACF 6.0, it broke a few things, so I had to reinstall the last version before ACF 6.0.

    I have just tested our staging site on WP 6.1 and all is still working fine. My point being that it might not be WP, but ACF now causing the issue. If you are happy it is not ACF because you have tested WP 6.1 with ACF 5.12.4. This is how we have registered our acf blocks.

    function register_acf_block_types() {
    
      // register CTA block.
      acf_register_block_type(array(
        'name'              => 'cta',
        'title'             => __('CTA'),
        'description'       => __('A custom cta block.'),
    		'render_template'   => 'blocks/cta.php',
    		'render_callback'	=> 'my_acf_block_render_callback',
        'category'          => 'formatting',
        'icon'              => 'admin-comments',
    		'keywords'          => array( 'cta', 'custom' ),
    		'mode' 	=> 'edit'
     ));
    }
    
    // Check if function exists and hook into setup.
    if( function_exists('acf_register_block_type') ) {
      add_action('acf/init', 'register_acf_block_types');
    }