• Resolved danidada

    (@danidada)


    Hello!

    Not sure why because there aren’t errors in console but the accordion block is loaded with 2 inner accordion items that can’t be duplicated so I’m stuck with only 2 items… Am I missing something?

    Thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hello, We apologize for any inconvenience you’ve experienced.

    Kindly check out this video demonstrating how to add/duplicate accordion items.

    If the issue persists, could you please provide the name of your FSE theme and a complete list of all active plugins? Any additional details on the steps to reproduce the issue would be greatly appreciated.

    Thank you for your cooperation. Your patience is truly appreciated

    Thread Starter danidada

    (@danidada)

    Hello! Yes there is not option on my editor:

    It’s a custom FSE theme and these are the plugins installed:

    Hello,

    Thanks for the screenshots—they’re very helpful.

    The duplication option for Accordion items is a standard feature in the Gutenberg editor. If it’s missing, there’s a possibility it could be related to your custom theme.

    Could you please try temporarily switching to a default WordPress theme (like Twenty Twenty-Five) and let us know if the duplication option reappears? This will help us test and troubleshoot the issue together.

    We appreciate your cooperation in testing this.

    Thread Starter danidada

    (@danidada)

    Yes, you were right and I’ve also found out what is causing the missing “duplicate” option but I can’t understand why it’s happening….

    The culprit is this filter:

    add_filter( 'allowed_block_types_all', function( $allowed_block_types, $block_editor_context ) {
    if ( isset( $block_editor_context->post ) && $block_editor_context->post->post_type !== 'prodotto_ag' ) {
    $blocks = WP_Block_Type_Registry::get_instance()->get_all_registered();
    // Blocks to remove.
    $disallowed_blocks = [
    'acf/prod-price',
    ];
    foreach ( $disallowed_blocks as $block ) {
    unset( $blocks[ $block ] );
    }
    return array_keys( $blocks );
    }
    }, 10, 2 );

    And it’s been added to prevent the use of a custom block (acf/prod-price) on other post types (rather that “prodotto_ag”).

    Any hint?

    Thread Starter danidada

    (@danidada)

    I’m just adding a detail: I could restrict the block to the custom post type, but the issue was to allow its use inside the fse template for the custom post type because I’m registering it through “acf_register_block_type” and using the parameter “post_types” doesn’t let me have it available inside the template editor.

    Thank you for sharing your insights and for investigating this in detail.

    This issue is related to compatibility between your theme and Gutenberg. I recommend reaching out to the theme developer, who may have more tailored solutions or advice.

    Best regards

    Plugin Support nerminnc

    (@nerminnc)

    Hello,

    Hope you’re doing well today 🙂

    I didn’t hear from you for a while, so I hope that everything is going fine with you.

    If you have any farther questions, please don’t hesitate to feed me back anytime 🙂

    Thanks,

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Accordion Block limited to 2 items’ is closed to new replies.