Skip to content

Instantly share code, notes, and snippets.

@theukedge
Created May 15, 2014 14:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save theukedge/be00f9e96d0c08d8201c to your computer and use it in GitHub Desktop.
Save theukedge/be00f9e96d0c08d8201c to your computer and use it in GitHub Desktop.
<?php
function hpc_spotlight_metaboxes( $meta_boxes ) {
$prefix = '_hpc_spotlight_'; // Prefix for all fields
$meta_boxes[] = array(
'id' => 'hpc_spotlight_meta',
'title' => 'In The Spotlight settings',
'pages' => array('spotlight'), // post type
'context' => 'normal',
'priority' => 'high',
'show_names' => true, // Show field names on the left
'fields' => array(
array(
'name' => 'End date',
'desc' => 'Enter the date and time (Pactific Time) when this spotlight feature should cease to appear on the front page.',
'id' => $prefix . 'end_time',
'type' => 'text_datetime_timestamp',
),
),
);
return $meta_boxes;
}
add_filter( 'cmb_meta_boxes', 'hpc_spotlight_metaboxes' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment