Support

Account

Home Forums Gutenberg acf_register_block_type() multiple => false not working

Solved

acf_register_block_type() multiple => false not working

    • optart

    • May 11, 2019 at 7:02 pm

    hi,
    am i doing something wrong or is there a bug in 5.8.0 with multiple=>false?

    my block works fine, but adding to acf_register_block_type params array “‘multiple’ => false,” doesn’t change anything – I can still add multiple instances of same block on same page, while in my scenario it’s not desirable

    • NickDA

    • May 12, 2019 at 8:04 am

    ‘multiple’ => false works fine with me… WP 5.2, ACF 5.8.

    Make sure you have it in the supports array, here is an example:

    ‘supports’ => array( ‘customClassName’ => false, ‘align’ => false, ‘mode’ => false, ‘multiple’ => false,),

    • optart

    • May 12, 2019 at 8:07 am

    same setup and only newest versions.
    maybe important – acf pro 5.8 loaded as part of other plugin
    nothing else installed

    to be sure – when “false” and I have already one block of defined type, i shouldn’t see this block and be able to choose it when adding new blocks on same post. right?

    • optart

    • May 12, 2019 at 8:09 am

    ‘supports’ => array( ) – that was it, thanks!

Viewing 4 posts - 1 through 4 (of 4 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.