<?php





function metabox_home(array $product_meta){
	
	$product_meta[] = array(
	
			'id' => 'section-one',
			'title' => 'Extra Fields',
			'object_types' => array('home-gallery'),
			'fields' => array(
			
				array(
						'id' => 'home-pic',
						'name' => 'Gallery Image',
						'type' => 'file',
						
					),
		
			)

	);
	
	return $product_meta;	
}
add_filter('cmb2_meta_boxes','metabox_home');


function metabox_galler(array $product_meta){
	
	$product_meta[] = array(
	
			'id' => 'section-two',
			'title' => 'Extra Fields',
			'object_types' => array('post'),
			'fields' => array(
			
				array(
						'id' => 'serial',
						'name' => 'Serial number',
						'type' => 'text',
						
					),
				
				array(
						'id' => 'pic',
						'name' => 'Your Image',
						'type' => 'file',
						
					),
				
								
				array(
						'id' => 'deg',
						'name' => 'Your Designation',
						'type' => 'text',
						
					),
				
				array(
						'id' => 'phone',
						'name' => 'Your Phone Number',
						'type' => 'text',
						
					),
		
			)

	);
	
	return $product_meta;	
}
add_filter('cmb2_meta_boxes','metabox_galler');



function metabox_nitc(array $product_meta){
	
	$product_meta[] = array(
	
			'id' => 'section-three',
			'title' => 'Extra Fields',
			'object_types' => array('projects'),
			'fields' => array(
			
				array(
						'id' => 'p-serial',
						'name' => 'Serial number',
						'type' => 'text',
						
					),
				
											
				array(
						'id' => 'p-date',
						'name' => 'Date Text',
						'type' => 'text',
						
					),	

					
				array(
						'id' => 'p-name',
						'name' => 'Project Name Text',
						'type' => 'text',
						
					),
					
					
				
				array(
						'id' => 'p-down',
						'name' => 'Download',
						'type' => 'file',
						
					),
					
					
					
					
		
			)

	);
	
	return $product_meta;	
}
add_filter('cmb2_meta_boxes','metabox_nitc');




function metabox_porje(array $product_meta){
	
	$product_meta[] = array(
	
			'id' => 'section-four',
			'title' => 'Extra Fields',
			'object_types' => array('notic'),
			'fields' => array(
			
				array(
						'id' => 'n-serial',
						'name' => 'Serial number',
						'type' => 'text',
						
					),
				
											
				array(
						'id' => 'date',
						'name' => 'Date Text',
						'type' => 'text',
						
					),
				
				array(
						'id' => 'down',
						'name' => 'Download',
						'type' => 'file',
						
					),
					
					
					
					
		
			)

	);
	
	return $product_meta;	
}
add_filter('cmb2_meta_boxes','metabox_porje');












/*
function metabox_product(array $product_meta){
	
	$product_meta[] = array(
	
			'id' => 'first-section',
			'title' => 'Fist Metabox',
			'object_types' => array('product', 'post'),
			'fields' => array(
					array(
						'id' => 'developer',
						'name' => 'Developer Version',
						'type' => 'text',
						
					),
			)

	);
	
	return $product_meta;
}
add_filter('cmb2_meta_boxes','metabox_product');


Output=========
<?php echo get_post_meta(get_the_ID(),'developer', true); ?>

*/