Title: WordPress nested block variation
Last modified: May 6, 2024

---

# WordPress nested block variation

 *  [Zbynek Nedoma](https://wordpress.org/support/users/domaneni/)
 * (@domaneni)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/wordpress-nested-block-variation/)
 * [[I have two blocks **parent** and **child**. I would like to create variation
   of both of them (**parentV** and **childV**) and have the **childV** as inner
   block of the **parentV**. But when I try it with registerBlockVariation() I am
   getting error, that **childV** does not exists. Is there something special I 
   need to do for **childV** variation registration.
 * Example what I have
 *     ```wp-block-code
       {
         "name": "child",
         "title": "Child",
         "parent": ["parent"]
       }
   
       {
         "name": "parent",
         "title": "Parent"
       }
       ```
   
 * Parent has the child in **allowedBlocks**.
 * Then I have TS
 *     ```wp-block-code
       domReady( function () {
         registerBlockVariation( 'child',
           {
             name: 'childV',
             title: 'ChildV',
             attributes: {
               className: 'child-v',
             },
           }
         );
   
         registerBlockVariation( 'parent',
           {
             name: 'parentV',
             title: 'Parent V',
             attributes: {
               className: 'parent-v',
             },
             innerBlocks: [
               {
                 name: 'childV',
               },
             ],
           }
         );
       });
       ```
   
    - Am I missing something?
    - Is it event possible to create variations like this?
 * Thank you for help 🙂

The topic ‘WordPress nested block variation’ is closed to new replies.

## Tags

 * [block](https://wordpress.org/support/topic-tag/block/)
 * [variation](https://wordpress.org/support/topic-tag/variation/)

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 0 replies
 * 2 participants
 * Last reply from: [Zbynek Nedoma](https://wordpress.org/support/users/domaneni/)
 * Last activity: [2 years, 1 month ago](https://wordpress.org/support/topic/wordpress-nested-block-variation/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
