Sure. Here’s the code
<?php
/**
* For more information, please visit:
* @link https://metabox.io/docs/registering-meta-boxes/
*/
add_filter( 'rwmb_meta_boxes', 'LPF_register_meta_boxes' );
/**
* Register meta boxes
*/
function LPF_register_meta_boxes( $meta_boxes )
{
// Better has an underscore as last sign
$prefix = 'LPF_';
// 1st meta box
$meta_boxes[] = array(
// Meta box id, UNIQUE per meta box. Optional since 4.1.5
'id' => 'standard',
'title' => __( 'Doctor Details', 'meta-box' ),
'post_types' => array( 'Doctors', 'page' ),
'context' => 'normal',
'priority' => 'high',
'autosave' => true,
// List of meta fields
'fields' => array(
// TEXT
array(
// Field name - Will be used as label
'name' => __( 'Address', 'meta-box' ),
// Field ID, i.e. the meta key
'id' => "{$prefix}address",
// Field description (optional)
'desc' => __( '', 'meta-box' ),
'type' => 'text',
// Default value (optional)
'std' => __( '', 'meta-box' ),
),
// TEXT
array(
// Field name - Will be used as label
'name' => __( 'City', 'meta-box' ),
'id' => "{$prefix}city",
'type' => 'text',
),
// TEXT
array(
// Field name - Will be used as label
'name' => __( 'State', 'meta-box' ),
'id' => "{$prefix}state",
'type' => 'text',
),
// TEXT
array(
// Field name - Will be used as label
'name' => __( 'Zip', 'meta-box' ),
'id' => "{$prefix}zip",
'type' => 'text',
),
// EMAIL
array(
'name' => __( 'Email', 'meta-box' ),
'id' => "{$prefix}email",
'type' => 'email',
),
// DIVIDER
array(
'type' => 'divider',
'id' => 'fake_divider_id', // Not used, but needed
),
// Featured Doc CHECKBOX
array(
'name' => __( 'Featured Doc', 'meta-box' ),
'id' => "{$prefix}feat_doc",
'type' => 'checkbox',
'desc' => __( 'Is this a Featured Doctor?', 'meta-box' ),
// Value can be 0 or 1
'std' => 0,
),
// URL
array(
'name' => __( 'Sponsor', 'meta-box' ),
'id' => "{$prefix}sponsor",
'desc' => __( 'Sponsor Link', 'meta-box' ),
'type' => 'url',
),
// IMAGE UPLOAD
array(
'name' => __( 'Sponsor Logo', 'meta-box' ),
'id' => "{$prefix}sponsorlogo",
'type' => 'image',
),
),
);
return $meta_boxes;
}