Frontend Posts Do Not Generate Video Thumbnails
-
Hello!
I’ve read through the forums for this particular issue and I’ve found very similar topics to mine:
– [Plugin: Video Thumbnails] fetching video thumbnails upon frontend post creation
– Get Video Thumbnails when the post is scheduled
– Get thumbnail when saving draft
– Video Thumbnails with Front End publishing
I have created a form for users to submit video URLs on the frontend but once they submit the form (it’s submitted as a published custom post type), the post type publishes but without a video thumbnail. In order to generate the thumbnail, I have to update the post on the backend.
I’ve tried placing the following code snippets into my functions.php file and in the plugin video-thumbnail.php file (as suggested in the above topics) but nothing works for me:
– update_post_meta( $the_post_id, ‘_videoembed’, $video_url); with get_video_thumbnail($the_post_id);
– add_action(‘save_post’, ‘save_other_video_thumbnail’, 100, 1);
function save_other_video_thumbnail($post_id) {
$postdata = get_postdata($post_id);
if ($postdata[‘post_status’] == ‘future’) {
get_video_thumbnail($post_id);}}– // Add actions to save video thumbnails when saving Draft
add_action(‘save_post’, ‘save_draft_video_thumbnail’, 100, 1);
function save_draft_video_thumbnail($post_id) {
$postdata = get_postdata($post_id);
if ($postdata[‘post_status’] == ‘draft’) {
get_video_thumbnail( $post_id );}}Can someone please help me? I absolutely love this plugin and quite frankly it’s one of the few video plugins that does exactly what I need it to do. I do apologize for being long-winded but I obviously don’t know what I’m doing. Any assistance would be greatly appreciated!
- The topic ‘Frontend Posts Do Not Generate Video Thumbnails’ is closed to new replies.