Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created September 14, 2012 14:43
Show Gist options
  • Save billerickson/070476e584b04a20c770 to your computer and use it in GitHub Desktop.
Save billerickson/070476e584b04a20c770 to your computer and use it in GitHub Desktop.
<?php
add_filter( 'cmb_meta_boxes' , 'be_metaboxes' );
/**
* Create Metaboxes
*
* @link http://www.billerickson.net/wordpress-metaboxes/
*
*/
function be_metaboxes( $meta_boxes ) {
$meta_boxes[] = array(
'id' => 'be-cat-2',
'title' => 'Category 2 Information',
'pages' => array('post'),
'show_on' => array(
'key' => 'taxonomy',
'value' => array(
'category' => 'cat-2',
'rotator-location' => array( 'location-1', 'location-3' )
)
),
'context' => 'normal',
'priority' => 'high',
'show_names' => true,
'fields' => array(
array(
'name' => 'Subtitle',
'desc' => '',
'id' => 'be_post_subtitle',
'type' => 'text'
),
),
);
return $meta_boxes;
}
@wasimgit
Copy link

I am using standard categories, not work for me, please suggest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment