Home Forums Gutenberg Incorrect 'align' value in acf_register_block_type


Incorrect 'align' value in acf_register_block_type

    • lunule

    • November 13, 2019 at 4:46 am


    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 ( there are two “slots” to define block alignment, one on “parent level”, and another one in the ‘supports’ sub-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?


Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.