$prefix . 'p1banner_option', 'title' => esc_html__( 'Upload Banner Image', 'ariana' ), 'object_types' => array( 'page' , 'post', 'portfolios'), // Post type 'context' => 'normal', 'priority' => 'high', 'show_names' => true, // Show field names on the left //'show_on' => array( 'id' => array( 2, ) ), // Specific post IDs to display this metabox ) ); $cmb2_post_1_options->add_field( array( 'id' => $prefix .'upload_banner_image', 'desc' => esc_html__( 'Please upload banner image here ','ariana' ), 'type' => 'file', ) ); //Post Options $cmb2_post_options = new_cmb2_box( array( 'id' => $prefix . 'posts_option', 'title' => esc_html__( 'Post Options', 'ariana' ), 'object_types' => array( 'post'), // Post type 'context' => 'normal', 'priority' => 'high', 'show_names' => true, // Show field names on the left //'show_on' => array( 'id' => array( 2, ) ), // Specific post IDs to display this metabox ) ); $cmb2_post_options->add_field( array( 'name' => esc_html__('Audio / Video Post Embed Code ' , 'ariana'), 'id' => $prefix .'vid_post_title', 'type' => 'title', ) ); $cmb2_post_options->add_field( array( 'name' => esc_html__('Embed Code' , 'ariana'), 'id' => $prefix .'embed_code', 'desc' => esc_html__('enter embed code here' , 'ariana'), 'type' => 'textarea_code', ) ); $cmb2_client = new_cmb2_box( array( 'id' => $prefix . 'client_options', 'title' => esc_html__( 'Clients Info', 'ariana' ), 'object_types' => array( 'clients'), // Post type 'context' => 'normal', 'priority' => 'high', 'show_names' => true, // Show field names on the left //'show_on' => array( 'id' => array( 2, ) ), // Specific post IDs to display this metabox ) ); $cmb2_client->add_field( array( 'name' => esc_html__('Link' , 'ariana'), 'id' => $prefix .'clinet_link', 'desc' => esc_html__( 'enter url here','ariana' ), 'type' => 'text', 'default' => '#', ) ); $cmb2_team = new_cmb2_box( array( 'id' => $prefix . 'team_mem_options', 'title' => esc_html__( 'Team Member Info', 'ariana' ), 'object_types' => array('a_team'), // Post type 'context' => 'normal', 'priority' => 'high', 'show_names' => true, // Show field names on the left //'show_on' => array( 'id' => array( 2, ) ), // Specific post IDs to display this metabox ) ); $cmb2_team->add_field( array( 'name' => esc_html__('Designation' , 'ariana'), 'id' => $prefix .'team_designation', 'desc' => esc_html__( 'write designation here','ariana' ), 'type' => 'text', 'default' => 'Web Developer', ) ); $teamgroup_field_id = $cmb2_team->add_field( array( 'id' => $prefix .'team_group_field_opt', 'type' => 'group', // 'repeatable' => false, // use false if you want non-repeatable group 'options' => array( 'group_title' => esc_html__( 'Social Media link {#}', 'ariana' ), // since version 1.1.4, {#} gets replaced by row number 'add_button' => esc_html__( 'Add New Link', 'ariana' ), 'remove_button' => esc_html__( 'Remove Link', 'ariana' ), 'sortable' => true, // beta // 'closed' => true, // true to have the groups closed by default ), ) ); // Id's for group's fields only need to be unique for the group. Prefix is not needed. $cmb2_team->add_group_field( $teamgroup_field_id, array( 'name' => esc_html__('Social Media Icon' , 'ariana'), 'id' => $prefix .'team_sm_icon', 'type' => 'text', 'default' => 'fa-facebook', 'description' => esc_html__('enter social media icon here. get all icon visit - http://fortawesome.github.io/Font-Awesome/icons/' , 'ariana'), // 'repeatable' => true, // Repeatable fields are supported w/in repeatable groups (for most types) ) ); $cmb2_team->add_group_field( $teamgroup_field_id, array( 'name' => esc_html__('Social Media Url' , 'ariana'), 'description' => esc_html__( 'enter social url','ariana' ), 'id' => $prefix .'team_sm_link', 'type' => 'text', 'default' => '#', ) ); $cmb2_testimonials = new_cmb2_box( array( 'id' => $prefix . 'testimonials_options', 'title' => esc_html__( 'Testimonials Info', 'ariana' ), 'object_types' => array( 'testimonials'), // Post type 'context' => 'normal', 'priority' => 'high', 'show_names' => true, // Show field names on the left //'show_on' => array( 'id' => array( 2, ) ), // Specific post IDs to display this metabox ) ); $cmb2_testimonials->add_field( array( 'name' => esc_html__('Rating' , 'ariana'), 'id' => $prefix .'test_rating', 'desc' => esc_html__( 'choice rating here','ariana' ), 'type' => 'radio_inline', 'default' => '5', 'options' => array( '1' => esc_html__('One', 'ariana'), '2' => esc_html__('Two', 'ariana'), '3' => esc_html__('Three', 'ariana'), '4' => esc_html__('Four', 'ariana'), '5' => esc_html__('Five', 'ariana'), ), ) ); $cmb2_portfolios = new_cmb2_box( array( 'id' => $prefix . 'portfolios_options', 'title' => esc_html__( 'Portfolios Info', 'ariana' ), 'object_types' => array( 'portfolios'), // Post type 'context' => 'normal', 'priority' => 'high', 'show_names' => true, // Show field names on the left //'show_on' => array( 'id' => array( 2, ) ), // Specific post IDs to display this metabox ) ); $cmb2_portfolios->add_field( array( 'name' => esc_html__('Client Label' , 'ariana'), 'id' => $prefix .'port_client_label', 'desc' => esc_html__( 'write client Label here','ariana' ), 'type' => 'text', 'default' => 'Client', ) ); $cmb2_portfolios->add_field( array( 'name' => esc_html__('Client Name' , 'ariana'), 'id' => $prefix .'port_client_name', 'desc' => esc_html__( 'write client name here','ariana' ), 'type' => 'text', 'default' => 'Themeforest', ) ); $cmb2_portfolios->add_field( array( 'name' => esc_html__('Date Label' , 'ariana'), 'id' => $prefix .'port_date_label', 'desc' => esc_html__( 'write date Label here','ariana' ), 'type' => 'text', 'default' => 'Project Date', ) ); $cmb2_portfolios->add_field( array( 'name' => esc_html__('Date' , 'ariana'), 'id' => $prefix .'port_date', 'desc' => esc_html__( 'write Date here','ariana' ), 'type' => 'text', 'default' => 'February 18, 2016', ) ); $cmb2_portfolios->add_field( array( 'name' => esc_html__('Project Url Label' , 'ariana'), 'id' => $prefix .'port_project_url_label', 'desc' => esc_html__( 'write date Label here','ariana' ), 'type' => 'text', 'default' => 'Project Url', ) ); $cmb2_portfolios->add_field( array( 'name' => esc_html__('Project Url' , 'ariana'), 'id' => $prefix .'port_pro_url', 'desc' => esc_html__( 'write project url here','ariana' ), 'type' => 'text', 'default' => 'www.themeforest.net', ) ); }