How to display video from wordpress media library
-
Hi,
I created this code online belowadd_filter( 'rwmb_meta_boxes', 'prefix_meta_boxes' ); function prefix_meta_boxes( $meta_boxes ) { $meta_boxes[] = array( 'id' => 'addvideo', 'title' => 'video', 'post_types' => array('post', 'page'), 'fields' => array( array( 'id' =>'video', 'type' => 'video', 'name' => 'Video', 'desc' => esc_html__( 'The video of introducing yourself', 'metabox-online-generator' ), 'max_file_uploads' => 1, 'class' => 'float: left;', 'attributes' => array( 'required' => 'true', ), ), ), ); return $meta_boxes; }
and add this code below in my single.php to display the video, but didn’t display the video.
$value = rwmb_meta( 'video' ); echo $value;
only saw “Array”
Thanks a lot
Vilson
- The topic ‘How to display video from wordpress media library’ is closed to new replies.