Skip to content

Instantly share code, notes, and snippets.

@heddesheimer
heddesheimer / metabox
Created March 13, 2015 16:51
Example to show the problem when using file and file_ist on the same page.
add_action( 'cmb2_init', 'yourprefix_register_about_page_metabox' );
function yourprefix_register_about_page_metabox() {
// Start with an underscore to hide fields from custom fields list
$prefix = '_yourprefix_about_';
/**
* Metabox to be displayed on a single page ID
*/
$cmb_about_page = new_cmb2_box( array(