Hello to everybody,
I need to deal with the correct use of the CMB2 plug-in.
I want to use them only on specific templates (template-homepage.blade.php). But my listing does not work.
$cmb->add_field( array(
'name' => esc_html__( 'Multiple Files', 'cmb2' ),
'desc' => esc_html__( 'Upload or add multiple images/attachments.', 'cmb2' ),
'id' => $prefix . 'file_list',
'type' => 'file_list',
'preview_size' => array( 100, 100 ), // Default: array( 50, 50 )
'show_on' => array( 'key' => 'page-template', 'value' => 'template-homepage.blade.php' ),
) );
Can you tell me what is the right listing?