Clone group not working ?
- This topic has 1 reply, 2 voices, and was last updated 4 years, 8 months ago by
Long Nguyen.
Viewing 2 posts - 1 through 2 (of 2 total)
-
AuthorPosts
-
March 6, 2021 at 2:41 PM #24741
Martin Rybos
ParticipantHi.
I have created a group. Shouldn't I be able to clone?$meta_boxes[] = array( 'title' => 'Divart Slider', 'post_types' => ['divart_slider'], 'columns' => array( 'column-1' => 8, // Simply define the size of the column (from 1 to 12) 'column-2' => 4, ), 'fields' => array( array( 'id' => 'disliders', // Group field 'type' => 'group', // Clone whole group? 'clone' => true, // Drag and drop clones to reorder them? 'sort_clone' => true, // Sub-fields 'collapsible' => true, 'group_title' => 'Slide {#}', // ID of the subfield 'save_state' => true, 'fields' => array( array( 'placeholder' => 'Background Image', 'id' => 'bgimg', 'type' => 'file_input', 'column' => 'column-1', ), array( 'placeholder' => 'Gradient Rotate (0 - 360max)', 'id' => 'grrotate', 'type' => 'text', 'column' => 'column-2', ), array( 'id' => 'bgcolor', 'type' => 'color', 'alpha_channel' => true, 'column' => 'column-1', ), //etc
March 6, 2021 at 4:47 PM #24744Long Nguyen
ModeratorHi,
We can add more clone groups by clicking the "Add More" button, screenshot https://share.getcloudapp.com/jkuejERk.
It creates a new group from the default settings (when registering the meta box), not create a new one from your current (clone) group.
Get more details here https://docs.metabox.io/cloning-fields/.
-
AuthorPosts
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.