Support

Account

Home Forums Gutenberg Incorrect 'align' value in acf_register_block_type

Unread

Incorrect 'align' value in acf_register_block_type

  • Hello,

    Great plugin, one of my favorites!! 🙂

    So – I’m using the new blocks feature in a new project, it’s really a lifesaver, but there seems to be a bug.

    Based on the documentation (https://www.advancedcustomfields.com/resources/acf_register_block_type/) there are two “slots” to define block alignment, one on “parent level”, and another one in the ‘supports’ sub-array:

    acf_register_block_type(array(
        // (...)
        'align' 		=> '',
        // (...)
        'supports' 		=> array(
        	'align' 	=> false,
    	),
    ));

    Now, what I see is that the automatically added/generated class name, based on the align value, can not be totally “nulled”. Even if align has the value false in the supports sub-array, there’s an alignleft class generated on the front-end. Which is a problem, because our stylesheet defines a left float for elements having the alignleft class.

    Is there any way to stop ACF generating an alignment class in the block output on the frontend?

    Thanks!

Viewing 1 post (of 1 total)

The topic ‘Incorrect 'align' value in acf_register_block_type’ is closed to new replies.