• Resolved jelly_bean

    (@jelly_bean)


    My client only wants users to be allowed to upload one file. How do I turn off the Add new file option?

    This is my code:

    add_filter( 'rwmb_meta_boxes', 'cnotes_register_meta_boxes' );
    function cnotes_register_meta_boxes( $meta_boxes ) {
        $prefix = 'cn_';
        
        $meta_boxes[] = array(
            'title'      => __( 'Competitor Notes', 'textdomain' ),
            'post_types' => 'event',
            'fields'     => array(
                array(
                    'name' => __( 'URL', 'textdomain' ),
                    'id'   => $prefix . 'url',
                    'type' => 'file',
                ),
            )
        );
       
        return $meta_boxes;
    }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Upload only one file’ is closed to new replies.