Support

Account

Forum Replies Created

  • You need to add these options to the “supports” array in your acf_register_block_type() function:

    
    'supports' => array(
         'align' => array( 'left', 'right', 'center', 'wide', 'full' ),
    ),
    

    This can be found in the documentation for the ARBT function

  • Something definitely changed from 5.9 to 5.10. I’ve been looking/waiting for a fix to this for weeks now. I also have a series of simple blocks that were all working fine prior to v5.10.x. I am using $block[‘backgroundColor’] and $block[‘textColor’] to apply the appropriate CSS classes to my blocks. Works fine on the front-end, but in the editor, it doesn’t work at all. Using my dev tools, it looks like everything inside of the “acf-block-preview” div is a click behind the div with a data-type of “acf/your-block-name”:

    1. Insert Block
    2. Select color-1. CSS class gets applied to wrapping div (with data-type), nothing get applied to div inside “wp-block-preview”.
    3. Select color-2. Correct color css class gets applied to wrapping div, but the inner div gets the class for the LAST color you selected applied (color-1).
    4. Proceed to bang head on desk

    I’ve basically had to resort to writing CSS that forces the wrapper to be transparent (with an !important tag), and then use the class that gets applied to that to style the inner div the way it is supposed to be. Very frustrating. I hope there is a fix soon that hopefully doesn’t break the my hacky solution that I’ve had to use over the last six weeks moving forward. I haven’t even seen this problem reported in the forums, which is very surprising. This thread appears to have been posted about 4 weeks ago and it is marked as “Unread.”

Viewing 2 posts - 1 through 2 (of 2 total)