Title: Create Nested Fields
Last modified: August 30, 2016

---

# Create Nested Fields

 *  Resolved [Zain Sohail](https://wordpress.org/support/users/zainsohail19/)
 * (@zainsohail19)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/create-nested-fields/)
 * Hello guys
 * I need to create nested fields in one field. Just similar to `query_args`,
 *     ```
       $meta_boxes[] = array(
           'id'       => 'select_post',
           'title'    => 'Post Selector',
           'pages'    => array( 'post', 'page' ),
           'context'  => 'normal',
           'priority' => 'high',
   
           'fields' => array(
               array(
                   'name'  => 'Post',
                   'desc'  => 'My Post Dropdown',
                   'id'    => 'my_post_dropdown',
                   'type'  => 'post',
                   'query_args' => array(
                   	'tax_query' => array(
                   		array(
                   			'taxonomy' => 'category',
                   			'field'	=> 'slug',
                   			'terms' => 'technology'
                   		)
                   	)
                   )
               ),
           )
       );
       ```
   
 * Like the code above this field would include a nested array with a text field
   and a simple checkbox. Also this field would be `cloneable`, I have been trying
   to get this done by creating a custom field but I always face a problem.
 * The ideal working state would be something like,
 *     ```
       array(
                       'name'       => 'Resume',
                       'desc'       => '',
                       'id'         => $prefix . 'resume_field',
                       'tab'        => 'resume',
                       'clone'      => true,
                       'sort_clone' => true,
                       'nested_fields'     =>
                           array(
                               'name'       => 'Text',
                               'desc'       => '',
                               'id'         => $prefix . 'resume_text',
                               'type'       => 'text',
                               'class'      => '',
                               'size'       => '170',
                               'columns'    => 12,
                           ),
                           array(
                               'name'       => 'Header',
                               'desc'       => '',
                               'id'         => $prefix . 'resume_header',
                               'type'       => 'checkbox',
                               'class'      => '',
                               'columns'    => 12,
                               'tab'        => 'resume'
                           )
                   ),
       ```
   
 * Can someone here please help me?
 * Thanks,
    Zain
 * [https://wordpress.org/plugins/meta-box/](https://wordpress.org/plugins/meta-box/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Anh Tran](https://wordpress.org/support/users/rilwis/)
 * (@rilwis)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/create-nested-fields/#post-6590715)
 * Hi,
 * You can use the [Meta Box Group](https://metabox.io/plugins/meta-box-group/) 
   extension (premium) to do that.

Viewing 1 replies (of 1 total)

The topic ‘Create Nested Fields’ is closed to new replies.

 * ![](https://ps.w.org/meta-box/assets/icon-128x128.png?rev=1100915)
 * [Meta Box](https://wordpress.org/plugins/meta-box/)
 * [Support Threads](https://wordpress.org/support/plugin/meta-box/)
 * [Active Topics](https://wordpress.org/support/plugin/meta-box/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/meta-box/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/meta-box/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Anh Tran](https://wordpress.org/support/users/rilwis/)
 * Last activity: [10 years, 8 months ago](https://wordpress.org/support/topic/create-nested-fields/#post-6590715)
 * Status: resolved