Forum Replies Created
-
-
Thank you. I have it working now. :)
Hello,
I believe I have it partly figured it out.
if( class_exists('FV_Player_MetaBox') ) { new FV_Player_MetaBox( array( 'name' => 'Video Player', 'meta_key' => 'video_player', 'post_type' => 'archive', // the post type here 'display' => true, 'multiple' => false, 'labels' => array( 'edit' => 'Edit Video', 'remove' => 'Remove Video' ) ) ); }
in the functions.php and:
<?php if( class_exists('FV_Player_Custom_Videos') ) { global $post; $objVideos = new FV_Player_Custom_Videos( array('id' => $post->ID, 'meta' => 'video_player', 'type' => 'post' ) ); $objVideos->get_form(); if( $objVideos->have_videos() ) { foreach( $objVideos->get_videos() AS $video ) { echo do_shortcode($video); } } } ?>
in the template PHP file.
Make sure to NOT have “Enable profile videos” on.
This adds a meta box at the bottom of the wp editor where the user can add/edit the video.
To the developers: I suggest you make this the default behavior and/or make a tutorial in the documentation on doing this. This really is more user-friendly in my opinion than the default.
The only question I have now is:
– How can I raise the priority of the Metabox so that its not at the bottom of the page (e.g: I would like to set it to ‘high’)?
Thanks
For clarification, I found an image on your site which shows the button I am talking about: https://foliovision.com/images/2018/11/fv-player-shortcode-id.png