$page_metabox->add_field( array( 'name' => esc_html__('Page Header Switcher', 'bulkdomain'), 'id' => $prefix . 'switcher', 'desc' => esc_html__('Show or hide Page Header Area.','bulkdomain'), 'type' => 'switch', 'default' => 1, 'label' => array('on'=> 'Show', 'off'=> 'Hide') //default On, Off ) ); $page_metabox->add_field( array( 'name' => esc_html__( 'Opacity', 'bulkdomain' ), 'id' => $prefix . 'page_bg_opacity', 'type' => 'own_slider', 'min' => '0', 'max' => '1', 'step' => '0.1', 'default' => '0', // start value 'value_label' => 'Value:', ) ); $page_metabox->add_field( array( 'name' => __('Image Select', 'cmb2'), 'desc' => __('page layout using image_select', 'cmb2'), 'id' => $prefix . 'page_custom_layout', 'type' => 'image_select', 'options' => array( 'disabled' => array('title' => 'Full Width', 'alt' => 'Full Width', 'img' => $image_path . 'img/sidebar-disabled.gif'), 'sidebar-left' => array('title' => 'Sidebar Left', 'alt' => 'Sidebar Left', 'img' => $image_path . 'img/sidebar-left.gif'), 'sidebar-right' => array('title' => 'Sidebar Right', 'alt' => 'Sidebar Right', 'img' => $image_path . 'img/sidebar-right.gif'), 'sidebar-leftright' => array('title' => 'Both Sidebars', 'alt' => 'Both Sidebars', 'img' => $image_path . 'img/sidebar-both.gif'), ), 'default' => 'default', ) );