- This topic has 2 replies, 2 voices, and was last updated 7 months ago by .
Hi, I've tried to add a File advanced field in a custom post type using the same example provided in documentation:
$meta_boxes = array( 'title' => 'File', 'post_types' => $this->post_type_name, 'fields' => array( 'id' => 'file', 'name' => 'File Advanced', 'type' => 'file_advanced', // Delete file from Media Library when remove it from post meta? // Note: it might affect other posts if you use same file for multiple posts 'force_delete' => false, // Maximum file uploads. 'max_file_uploads' => 2, // File types. // 'mime_type' => 'application,audio,video', // Do not show how many files uploaded/remaining. 'max_status' => 'false', 'multiple' => false ), );
but the control is rendered as 7 plain input controls.
I'm using WordPress 5.7. It makes no difference if I set Gutemberg or classic editor in the post type settings.
Kind regards, Luca
- You must be logged in to reply to this topic.