custom show_on filter not working
-
I am using the documentation and wanted to use the ‘slug’ show_on filter as a example. I call it after I require cmb2 and before the config. It will show the fields on all pages.
$cmb_front_page = new_cmb2_box( array( 'id' => $prefix . 'metabox', 'title' => esc_html__( 'Front page metabox', 'cmb2' ), 'object_types' => array( 'page' ), // Post type 'context' => 'normal', 'priority' => 'high', 'show_names' => true, // Show field names on the left 'show_on' => array( 'slug' => $frontPageID, ), // Specific page template to display this metabox ) );
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘custom show_on filter not working’ is closed to new replies.