Support

Account

Home Forums General Issues version 5.11 removed alignment classes from blocks Reply To: version 5.11 removed alignment classes from blocks

  • I didn’t have any supports key on the affected block. Because you said that I tried adding Align=> true without any luck.

    ‘supports’=> [
    ‘align’=> true,

    acf_register_block_type(array(
      'name'              => 'button-block',
      'title'             => __('Button'),
      'description'       => __('Custom Button'),
      'render_template'   => 'template-part/block/button/button.php',
      'category'          => 'oneper',
      'icon'              => 'admin-site',
      'supports'		=> [
    		'align'			=> true
    	],
      'keywords'          => array( 'button' ),
      'enqueue_assets' 	=> function(){
      wp_enqueue_script( 'block-button', get_template_directory_uri() . '/template-part/block/button/button.js', array(), '', true );
      }
    ));