Foliovision › Forums › FV Player › How to … › Automated Featured Image
-
-
Hi Crystal!
Can you please give us a bit more information about the problem? Do you have trouble with inserting featured image for videos (it is used in case there is no other featured image present) or do you have trouble with fetching automated featured image? This one work for Youtube and Vimeo hosted videos.
Thanks,
LuciaHello Crystal,
the featured image is automatically assigned if:
1) you pick the video splash screen from your WP media library
2) you save a post with a Vimeo or YouTube video in itPlease let us know if one of the above if the issue you are noticing and also what WordPress version you are using.
Thanks,
MartinHi,
I am using videos that are hosted on our site. And the featured image that I have uploaded are uploaded in wordpress. I was hoping by default that it would pick up the featured image in my wordpress posts to be shown as the splash screen without me having to manually add each splash image to a post. I have many posts with the video in them.
I am running WordPress 5.0.3This would be a great thing if somehow your developers can do this. ;)
Thanks for your response!
The thing is that I dont want to go in manually for each video and have to select it. We have tons of video that I would have to do that for.
Currently, we just have a video url set in a post and I have it set that fv player will play by default. I didnt have to go in and manually embed any short codes for my post even. So I’m not sure if what you are saying will work for us. Hopefully in the future fv could be able to pull the featured image of a post and make it the splash screen for that video.Hello Crystal,
FV Player comes with some useful filters, just like WordPress does. You can put the code from https://foliovision.com/player/advanced/api-programming -> “fv_flowplayer_args_pre” -> “code snippet which will automatically use the post featured image” to your theme functions.php and it will do what you need.
Thanks,
MartinThanks! I will try this.
Where do I place this code at?add_filter( 'fv_flowplayer_args_pre', 'fv_tweak_fv_flowplayer_args_pre' ); function fv_tweak_fv_flowplayer_args_pre( $args ) { global $post; if( !empty($post) && empty($args['splash']) ) $args['splash'] = get_the_post_thumbnail_url( $post->ID, 'large' ); return $args; }
Hello Crystal,
you can put it into your theme functions.php file or create a mini plugin.
More about the functions.php file can be found here: https://developer.wordpress.org/themes/basics/theme-functions/
If you have some experience with PHP it’s very easy.
Thanks,
MartinHello Crystal,
thank you, we always appreciate a fair and honest review, you can leave one here: https://wordpress.org/support/plugin/fv-wordpress-flowplayer/reviews/
Thanks,
Martin