Custom Fields
Re-Envisioned
Support Meta Box Group MB Group Clone Shortcode

  • Creator
    Topic
  • #16206
    Resolved Brian
    Participant

    Hi Anh,
    I’m having a hard time understanding how to write a shortcode to output your MB Group Clone example: https://metabox.io/clone-group-custom-fields-using-meta-box-group/

    $meta_boxes[] = array(
            'title' => 'Car Details',
            'context' => 'side',
            'fields' => array(
                array(
                    'id' => 'car',
                    'type' => 'group',
                    'clone' => true, // ALLOW “CAR” GROUP TO BE CLONED 
                    'add_button' => '+ Add Group',
                    'fields' => array(
                        array(
                            'name' => 'Brand',
                            'id' => 'brand',
                            'type' => 'text',
                        ),
                          array(
                            'name' => 'Date Release',
                            'id' => 'date',
                            'type' => 'date',
                          ),
                          array(
                            'name' => 'Color',
                            'id' => 'color',
                            'type' => 'color',
                            'add_button' => 'Add Color',
                        ),
                    ),
                ),
            ),
        );
        return $meta_boxes;
    }

    Any chance you could show me how with the above example?

    Thanks in advance!

Viewing 11 replies (of 11 total)
  • Author
    Replies
  • #16409
    Anh Tran
    Keymaster

    Nothing special, if you want to select a post/page, then post field is a little better. Otherwise, a normal select_advanced is better.

Viewing 11 replies (of 11 total)
  • You must be logged in to reply to this topic.

Newsletter

Subscribe to our newsletter to receive news and tutorials for Meta Box and WordPress.


grid gear info copy caret-up caret-down trash