Allow calendar for a post
composer require anewholm/cmb2-field-calendar
- Download the plugin
- Place the plugin folder in your
/wp-content/plugins/
directory - Activate the plugin in the plugins dashboard
array(
'id' => $prefix . 'location_metabox_calendar',
'title' => __( 'Calendar', $plugin_slug ),
'object_types' => array( $post_type, ), // Post type
'context' => 'side',
'priority' => 'high',
'show_names' => false,
'fields' => array(
array(
'name' => __( 'Calendar', $plugin_slug ),
'id' => $plugin_slug . '_location_calendar',
'type' => 'calendar',
'desc' => 'Used in Maps.',
),
),
),