Forum Replies Created
Viewing 3 posts - 1 through 3 (of 3 total)
-
AuthorPosts
-
zainsohail19
ParticipantHello Anh,
This worked well, just some CSS issues (http://take.ms/E1oSr). I also had one more question which I asked on WordPress.org support forums for your plugin, please see if you can answer this for me (https://wordpress.org/support/topic/multiple-options-in-one-field?replies=1) ..
Thanks,
Zainzainsohail19
ParticipantSorry the code provided above is the one I used without columns, below is the code which is not working correctly. The console in Chrome Dev Tools is empty, it shows blank page.
<?php /** * Creating Metaboxes for posts. * @return [array] [Metabox Parameters] */ function talent_metaboxes( $meta_boxes ) { $prefix = 'talent_'; // Post Quiz Metaboxes $meta_boxes[] = array( 'title' => 'Talent Details', 'id' => 'talent_attributes', 'pages' => array( 'talent' ), 'context' => 'normal', 'priority' => 'high', 'tabs' => array( 'about' => array( 'label' => __( 'About', 'rwmb' ), 'icon' => 'dashicons-admin-users', // Dashicon ), 'resume' => array( 'label' => __( 'Resume', 'rwmb' ), 'icon' => 'dashicons-welcome-learn-more', // Dashicon ), 'work' => array( 'label' => __( 'Work', 'rwmb' ), 'icon' => 'dashicons-admin-page', // Dashicon ), 'photos' => array( 'label' => __( 'Photos', 'rwmb' ), 'icon' => 'dashicons-format-gallery', // Dashicon ), 'ie-resume' => array( 'label' => __( 'Import/Export Resume', 'rwmb' ), 'icon' => 'dashicons-media-default', // Dashicon ), ), // Tab style: 'default', 'box' or 'left'. Optional 'tab_style' => 'box', 'fields' => array( /* ABOUT TAB */ array( 'name' => 'First Name', 'desc' => '', 'id' => $prefix . 'first_name', 'type' => 'text', 'class' => 'talent-details talent_first_name', 'clone' => false, 'columns' => 3, 'tab' => 'about' ), array( 'name' => 'Last Name', 'desc' => '', 'id' => $prefix . 'last_name', 'type' => 'text', 'class' => 'talent-details talent_last_name', 'clone' => false, 'columns' => 3, 'tab' => 'about' ), array( 'name' => 'Active', 'desc' => '', 'id' => $prefix . 'active', 'type' => 'checkbox', 'class' => 'talent-details talent_active', 'clone' => false, 'columns' => 2, 'tab' => 'about' ), array( 'name' => 'Featured', 'desc' => '', 'id' => $prefix . 'featured', 'type' => 'checkbox', 'class' => 'talent-details talent_featured', 'clone' => false, 'columns' => 2, 'tab' => 'about' ), array( 'name' => 'Hide Age', 'desc' => '', 'id' => $prefix . 'hide_age', 'type' => 'checkbox', 'class' => 'talent-details talent_hide_age', 'clone' => false, 'columns' => 2, 'tab' => 'about' ), array( 'name' => 'Description', 'desc' => '', 'id' => $prefix . 'description', 'type' => 'wysiwyg', 'class' => 'talent-details talent_description', 'clone' => false, 'columns' => 12, 'tab' => 'about' ), array( 'name' => 'Gender', 'desc' => '', 'id' => $prefix . 'gender', 'type' => 'select', 'options' => array( 'male' => 'Male', 'female' => 'Female', ), 'placeholder' => 'Select', 'class' => 'talent-details talent_gender', 'clone' => false, 'columns' => 4, 'tab' => 'about' ), array( 'name' => 'Ethnicity', 'desc' => '', 'id' => $prefix . 'ethnicity', 'type' => 'select', 'options' => array( 'African American' => 'African American', 'Asian' => 'Asian', 'Caucasian' => 'Caucasian', 'Latino' => 'Latino', 'Other' => 'Other', ), 'placeholder' => 'Select', 'class' => 'talent-details talent_ethnicity', 'clone' => false, 'columns' => 4, 'tab' => 'about' ), array( 'name' => 'Secondary Ethnicity', 'desc' => '', 'id' => $prefix . 'secondary_ethnicity', 'type' => 'select', 'options' => array( 'African American' => 'African American', 'Asian' => 'Asian', 'Caucasian' => 'Caucasian', 'Latino' => 'Latino', 'Other' => 'Other', ), 'placeholder' => 'Select', 'class' => 'talent-details talent_secondary_ethnicity', 'clone' => false, 'columns' => 4, 'tab' => 'about' ), array( 'name' => 'Tertiary Ethnicity', 'desc' => '', 'id' => $prefix . 'tertiary_ethnicity', 'type' => 'select', 'options' => array( 'African American' => 'African American', 'Asian' => 'Asian', 'Caucasian' => 'Caucasian', 'Latino' => 'Latino', 'Other' => 'Other', ), 'placeholder' => 'Select', 'class' => 'talent-details talent_tertiary_ethnicity', 'clone' => false, 'columns' => 4, 'tab' => 'about' ), array( 'name' => 'Hair Color', 'desc' => '', 'id' => $prefix . 'hair_color', 'type' => 'select', 'options' => array( 'Black' => 'Black', 'Blonde' => 'Blonde', 'Brown' => 'Brown', 'Grey' => 'Grey', 'Red' => 'Red', 'Salt & Pepper' => 'Salt & Pepper', 'White' => 'White', ), 'placeholder' => 'Select', 'class' => 'talent-details talent_hair_color', 'clone' => false, 'columns' => 4, 'tab' => 'about' ), array( 'name' => 'Eye color', 'desc' => '', 'id' => $prefix . 'eye_color', 'type' => 'select', 'options' => array( 'Black' => 'Black', 'Blue' => 'Blue', 'Brown' => 'Brown', 'Green' => 'Green', 'Grey' => 'Grey', 'Hazel' => 'Hazel', ), 'placeholder' => 'Select', 'class' => 'talent-details talent_eye_color', 'clone' => false, 'columns' => 4, 'tab' => 'about' ), array( 'name' => 'DOB', 'desc' => '', 'id' => $prefix . 'dob', 'type' => 'date', 'class' => 'talent-details talent_dob', 'clone' => false, 'columns' => 4, 'tab' => 'about' ), array( 'name' => 'Additional Range', 'desc' => '', 'id' => $prefix . 'additional_range', 'type' => 'select', 'options' => array( 'Can play younger' => 'Can play younger', 'Can play older' => 'Can play older', ), 'placeholder' => 'Select', 'class' => 'talent-details talent_additional_range', 'clone' => false, 'columns' => 4, 'tab' => 'about' ), array( 'name' => 'Height', 'desc' => '', 'id' => $prefix . 'height', 'type' => 'text', 'class' => 'talent-details talent_height', 'clone' => false, 'columns' => 4, 'tab' => 'about' ), array( 'name' => 'Weight (lbs)', 'desc' => '', 'id' => $prefix . 'weight', 'type' => 'text', 'class' => 'talent-details talent_weight', 'clone' => false, 'columns' => 4, 'tab' => 'about' ), array( 'name' => 'Website', 'desc' => '', 'id' => $prefix . 'website', 'type' => 'url', 'class' => 'talent-details talent_website', 'clone' => false, 'columns' => 4, 'tab' => 'about' ), /* RESUME TAB */ array( 'name' => 'Header', 'desc' => '', 'id' => $prefix . 'resume_header', 'type' => 'text', 'class' => '', 'clone' => true, 'sort_clone' => true, 'columns' => 12, 'tab' => 'resume' ), array( 'name' => '', 'desc' => '', 'id' => $prefix . 'resume_data', 'type' => 'text', 'class' => '', 'clone' => true, 'sort_clone' => true, 'columns' => 4, 'tab' => 'resume' ), array( 'name' => '', 'desc' => '', 'id' => $prefix . 'resume_data', 'type' => 'text', 'class' => '', 'clone' => true, 'sort_clone' => true, 'columns' => 4, 'tab' => 'resume' ), array( 'name' => '', 'desc' => '', 'id' => $prefix . 'resume_data', 'type' => 'text', 'class' => '', 'clone' => true, 'sort_clone' => true, 'columns' => 4, 'tab' => 'resume' ), /* WORK TAB */ array( 'name' => 'Voice Over', 'desc' => '', 'id' => $prefix . 'work_voiceover', 'type' => 'file', 'class' => 'talent-details talent_work_voiceover', 'clone' => false, 'tab' => 'work' ), array( 'name' => 'Theatrical Reel', 'desc' => '', 'id' => $prefix . 'work_theatrical_reel', 'type' => 'url', 'class' => 'talent-details talent_work_theatrical_reel', 'clone' => false, 'sort_clone' => false, 'tab' => 'work' ), array( 'name' => 'Commercial Reel', 'desc' => '', 'id' => $prefix . 'work_commercial_reel', 'type' => 'url', 'class' => 'talent-details talent_work_commercial_reel', 'clone' => false, 'sort_clone' => false, 'tab' => 'work' ), array( 'name' => 'Hosting Reel', 'desc' => '', 'id' => $prefix . 'work_hosting_reel', 'type' => 'url', 'class' => 'talent-details talent_work_commercial_reel', 'clone' => false, 'sort_clone' => false, 'tab' => 'work' ), /* PHOTOS TAB */ array( 'name' => 'Photos', 'desc' => '', 'id' => $prefix . 'work_voiceover', 'type' => 'image_advanced', 'class' => 'talent-details talent_work_voiceover', 'clone' => false, 'tab' => 'photos' ), ) ); return $meta_boxes; } add_filter( 'rwmb_meta_boxes', 'talent_metaboxes' );zainsohail19
ParticipantHello Anh, sorry for the late reply. Below is the code ..
<?php /** * Creating Metaboxes for posts. * @return [array] [Metabox Parameters] */ function talent_metaboxes( $meta_boxes ) { $prefix = 'talent_'; // Post Quiz Metaboxes $meta_boxes[] = array( 'title' => 'Talent Details', 'id' => 'talent_attributes', 'pages' => array( 'talent' ), 'context' => 'normal', 'priority' => 'high', 'tabs' => array( 'about' => array( 'label' => __( 'About', 'rwmb' ), 'icon' => 'dashicons-admin-users', // Dashicon ), 'resume' => array( 'label' => __( 'Resume', 'rwmb' ), 'icon' => 'dashicons-welcome-learn-more', // Dashicon ), 'work' => array( 'label' => __( 'Work', 'rwmb' ), 'icon' => 'dashicons-admin-page', // Dashicon ), 'photos' => array( 'label' => __( 'Photos', 'rwmb' ), 'icon' => 'dashicons-format-gallery', // Dashicon ), 'ie-resume' => array( 'label' => __( 'Import/Export Resume', 'rwmb' ), 'icon' => 'dashicons-media-default', // Dashicon ), ), // Tab style: 'default', 'box' or 'left'. Optional 'tab_style' => 'box', 'fields' => array( /* ABOUT TAB */ array( 'name' => 'First Name', 'desc' => '', 'id' => $prefix . 'first_name', 'type' => 'text', 'class' => 'talent-details talent_first_name', 'clone' => false, 'columns' => 3, 'tab' => 'about' ), array( 'name' => 'Last Name', 'desc' => '', 'id' => $prefix . 'last_name', 'type' => 'text', 'class' => 'talent-details talent_last_name', 'clone' => false, 'columns' => 3, 'tab' => 'about' ), array( 'name' => 'Active', 'desc' => '', 'id' => $prefix . 'active', 'type' => 'checkbox', 'class' => 'talent-details talent_active', 'clone' => false, 'columns' => 2, 'tab' => 'about' ), array( 'name' => 'Featured', 'desc' => '', 'id' => $prefix . 'featured', 'type' => 'checkbox', 'class' => 'talent-details talent_featured', 'clone' => false, 'columns' => 2, 'tab' => 'about' ), array( 'name' => 'Hide Age', 'desc' => '', 'id' => $prefix . 'hide_age', 'type' => 'checkbox', 'class' => 'talent-details talent_hide_age', 'clone' => false, 'columns' => 2, 'tab' => 'about' ), array( 'name' => 'Description', 'desc' => '', 'id' => $prefix . 'description', 'type' => 'wysiwyg', 'class' => 'talent-details talent_description', 'clone' => false, 'columns' => 12, 'tab' => 'about' ), array( 'name' => 'Gender', 'desc' => '', 'id' => $prefix . 'gender', 'type' => 'select', 'options' => array( 'male' => 'Male', 'female' => 'Female', ), 'placeholder' => 'Select', 'class' => 'talent-details talent_gender', 'clone' => false, 'columns' => 4, 'tab' => 'about' ), array( 'name' => 'Ethnicity', 'desc' => '', 'id' => $prefix . 'ethnicity', 'type' => 'select', 'options' => array( 'African American' => 'African American', 'Asian' => 'Asian', 'Caucasian' => 'Caucasian', 'Latino' => 'Latino', 'Other' => 'Other', ), 'placeholder' => 'Select', 'class' => 'talent-details talent_ethnicity', 'clone' => false, 'columns' => 4, 'tab' => 'about' ), array( 'name' => 'Secondary Ethnicity', 'desc' => '', 'id' => $prefix . 'secondary_ethnicity', 'type' => 'select', 'options' => array( 'African American' => 'African American', 'Asian' => 'Asian', 'Caucasian' => 'Caucasian', 'Latino' => 'Latino', 'Other' => 'Other', ), 'placeholder' => 'Select', 'class' => 'talent-details talent_secondary_ethnicity', 'clone' => false, 'columns' => 4, 'tab' => 'about' ), array( 'name' => 'Tertiary Ethnicity', 'desc' => '', 'id' => $prefix . 'tertiary_ethnicity', 'type' => 'select', 'options' => array( 'African American' => 'African American', 'Asian' => 'Asian', 'Caucasian' => 'Caucasian', 'Latino' => 'Latino', 'Other' => 'Other', ), 'placeholder' => 'Select', 'class' => 'talent-details talent_tertiary_ethnicity', 'clone' => false, 'columns' => 4, 'tab' => 'about' ), array( 'name' => 'Hair Color', 'desc' => '', 'id' => $prefix . 'hair_color', 'type' => 'select', 'options' => array( 'Black' => 'Black', 'Blonde' => 'Blonde', 'Brown' => 'Brown', 'Grey' => 'Grey', 'Red' => 'Red', 'Salt & Pepper' => 'Salt & Pepper', 'White' => 'White', ), 'placeholder' => 'Select', 'class' => 'talent-details talent_hair_color', 'clone' => false, 'columns' => 4, 'tab' => 'about' ), array( 'name' => 'Eye color', 'desc' => '', 'id' => $prefix . 'eye_color', 'type' => 'select', 'options' => array( 'Black' => 'Black', 'Blue' => 'Blue', 'Brown' => 'Brown', 'Green' => 'Green', 'Grey' => 'Grey', 'Hazel' => 'Hazel', ), 'placeholder' => 'Select', 'class' => 'talent-details talent_eye_color', 'clone' => false, 'columns' => 4, 'tab' => 'about' ), array( 'name' => 'DOB', 'desc' => '', 'id' => $prefix . 'dob', 'type' => 'date', 'class' => 'talent-details talent_dob', 'clone' => false, 'columns' => 4, 'tab' => 'about' ), array( 'name' => 'Additional Range', 'desc' => '', 'id' => $prefix . 'additional_range', 'type' => 'select', 'options' => array( 'Can play younger' => 'Can play younger', 'Can play older' => 'Can play older', ), 'placeholder' => 'Select', 'class' => 'talent-details talent_additional_range', 'clone' => false, 'columns' => 4, 'tab' => 'about' ), array( 'name' => 'Height', 'desc' => '', 'id' => $prefix . 'height', 'type' => 'text', 'class' => 'talent-details talent_height', 'clone' => false, 'columns' => 4, 'tab' => 'about' ), array( 'name' => 'Weight (lbs)', 'desc' => '', 'id' => $prefix . 'weight', 'type' => 'text', 'class' => 'talent-details talent_weight', 'clone' => false, 'columns' => 4, 'tab' => 'about' ), array( 'name' => 'Website', 'desc' => '', 'id' => $prefix . 'website', 'type' => 'url', 'class' => 'talent-details talent_website', 'clone' => false, 'columns' => 4, 'tab' => 'about' ), /* RESUME TAB */ array( 'name' => 'Header', 'desc' => '', 'id' => $prefix . 'resume_header', 'type' => 'text', 'class' => '', 'clone' => true, 'sort_clone' => true, 'tab' => 'resume' ), array( 'name' => 'Data', 'desc' => '', 'id' => $prefix . 'resume_data', 'type' => 'text', 'class' => '', 'clone' => true, 'sort_clone' => true, 'tab' => 'resume' ), /* WORK TAB */ array( 'name' => 'Voice Over', 'desc' => '', 'id' => $prefix . 'work_voiceover', 'type' => 'file', 'class' => 'talent-details talent_work_voiceover', 'clone' => false, 'tab' => 'work' ), array( 'name' => 'Theatrical Reel', 'desc' => '', 'id' => $prefix . 'work_theatrical_reel', 'type' => 'url', 'class' => 'talent-details talent_work_theatrical_reel', 'clone' => false, 'sort_clone' => false, 'tab' => 'work' ), array( 'name' => 'Commercial Reel', 'desc' => '', 'id' => $prefix . 'work_commercial_reel', 'type' => 'url', 'class' => 'talent-details talent_work_commercial_reel', 'clone' => false, 'sort_clone' => false, 'tab' => 'work' ), array( 'name' => 'Hosting Reel', 'desc' => '', 'id' => $prefix . 'work_hosting_reel', 'type' => 'url', 'class' => 'talent-details talent_work_commercial_reel', 'clone' => false, 'sort_clone' => false, 'tab' => 'work' ), /* PHOTOS TAB */ array( 'name' => 'Photos', 'desc' => '', 'id' => $prefix . 'work_voiceover', 'type' => 'image_advanced', 'class' => 'talent-details talent_work_voiceover', 'clone' => false, 'tab' => 'photos' ), ) ); return $meta_boxes; } add_filter( 'rwmb_meta_boxes', 'talent_metaboxes' ); -
AuthorPosts
Viewing 3 posts - 1 through 3 (of 3 total)