Custom Fields
Re-Envisioned
Support Meta Box Group Only First Group Field Appears

This topic contains 5 replies, has 2 voices, and was last updated by  Anh Tran 4 months, 2 weeks ago.

  • Creator
    Topic
  • #14440

    katev
    Participant

    I have just downloaded the extension and am using the latest version of the plugin. I have loaded the extension within my theme following the instructions provided. I then copied the exact code to create the group metabox and fields as provided on this site, yet only the first field appears. It doesn’t matter if I change the field types, have more or less fields, toggle the clone and sorting options on or off… nothing works to display any more than one field.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Author
    Replies
  • #14441

    katev
    Participant

    This is the code I’m using:

        $meta_boxes[] = array(
            'title'  => 'Album Tracks',
            'pages'   => array( 'post','page' ),
            'fields' => array(
                array(
                    'id'     => 'standard',
                    // Group field
                    'type'   => 'group',
                    // Clone whole group?
                    'clone'  => true,
                    // Drag and drop clones to reorder them?
                    'sort_clone' => true,
                    // Sub-fields
                    'fields' => array(
                        array(
                            'name' => 'Track name',
                            'id'   => 'text',
                            'type' => 'text',
                        ),
                        array(
                            'name' => 'Release Date',
                            'id'   => 'date',
                            'type' => 'date',
                        ),
                        array(
                            'name'    => 'Genre',
                            'id'      => 'genre',
                            'type'    => 'select_advanced',
                            'options' => array(
                                'pop'  => 'Pop',
                                'rock' => 'Rock',
                            ),
                        ),
                    ),
                ),
            ),
        );
    #14442

    katev
    Participant

    Upon further testing, I can see that the first field doesn’t even work properly. If I change it to a date field or another field type, it still shows as a text field.

    #14443

    katev
    Participant

    I have now tried installing the plugin normally via the WP Plugins page, but the result is still the same. It doesn’t work at all. Please get back to me asap. I’m on a tight deadline and could have just done this using CMB2 for free. I invested $50 in this extension to save time. It has to work.

    #14444

    katev
    Participant

    This is how the metabox appears

    #14451

    Anh Tran
    Keymaster

    Hi katev,

    From the screenshot, I guess you haven’t activated the Meta Box Group extension, have you? This is what I have on my localhost with your code:

    View post on imgur.com

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.