Title: InnerBlocks without extra wrapper
Last modified: January 19, 2024

---

# InnerBlocks without extra wrapper

 *  Resolved [Thessa Verbruggen](https://wordpress.org/support/users/thessav/)
 * (@thessav)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/innerblocks-without-extra-wrapper/)
 * I’m trying to create a custom Gutenberg block using ACF, creating a slideshow
   and slide block. The slide block can only be used inside the slideshow block 
   and the slideshow block can only contain slide blocks, so I’m using InnerBlocks
   to achieve this.
 * For the functioning of the slideshow I want to use Slick Slider and add data-
   attributes to the slider that contain the values from the custom field that are
   added to the slideshow block. In order for the slider to work, I need the following
   setup:
 *     ```wp-block-code
       <div class="omg-block-slider" data-slick="{'slidesToShow': 2}">
           <div class="omg-block-slide">
               ...
           </div>
           <div class="omg-block-slide">
               ...
           </div>
           <div class="omg-block-slide">
               ...
           </div>
       </div>
       ```
   
 * in my block file for the slideshow I added this:
 *     ```wp-block-code
       <div class="omg-block-slideshow" data-slick="{'slidesToShow': <?php echo $slides_desktop ?>}">
           <?php $allowed_inner_blocks = ['omg/omg-slide']; ?>
           <InnerBlocks allowedBlocks="<?php echo esc_attr(wp_json_encode($allowed_inner_blocks)); ?>" />
       </div>
       ```
   
 * On the front-end, the above translated to this:
 *     ```wp-block-code
       <div class="omg-block-slider" data-slick="{'slidesToShow': 2}">
           <div class="acf-innerblocks-container">
               <div class="omg-block-slide">
                   ...
               </div>
               <div class="omg-block-slide">
                   ...
               </div>
               <div class="omg-block-slide">
                   ...
               </div>
           </div>
       </div>
       ```
   
 * For Slick slider to work with the data-attributes, the attributes need to be 
   added to the slider element. In this case I need the slider element to be ‘.omg-
   block-slider’, but according to the generated setup ‘.acf-innerblocks-container’
   becomes the slider element. I can’t add the data-attributes to the innerblocks-
   container, it just gets ignored.
 * I’ve been thinking it over quite some time but can’t get my head around it. Is
   there a way to solve this?

Viewing 1 replies (of 1 total)

 *  Plugin Support [ACF Support](https://wordpress.org/support/users/acfsupport/)
 * (@acfsupport)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/innerblocks-without-extra-wrapper/#post-17402361)
 * Hi [@thessav](https://wordpress.org/support/users/thessav/)
 * ACF Support Team here. This forum is generally used by ACF users to help each
   other out. 
 * However, we would love to continue investigating and troubleshooting this issue,
   please can you create a ticket using our [​support form](https://www.advancedcustomfields.com/contact/)
   and we can look into it further.

Viewing 1 replies (of 1 total)

The topic ‘InnerBlocks without extra wrapper’ is closed to new replies.

 * ![](https://ps.w.org/advanced-custom-fields/assets/icon.svg?rev=3207824)
 * [Advanced Custom Fields (ACF®)](https://wordpress.org/plugins/advanced-custom-fields/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/advanced-custom-fields/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/advanced-custom-fields/)
 * [Active Topics](https://wordpress.org/support/plugin/advanced-custom-fields/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/advanced-custom-fields/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/advanced-custom-fields/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [ACF Support](https://wordpress.org/support/users/acfsupport/)
 * Last activity: [2 years, 4 months ago](https://wordpress.org/support/topic/innerblocks-without-extra-wrapper/#post-17402361)
 * Status: resolved