WordPress.org

Ready to get started?Download WordPress

Forums

Automatic Youtube Video Posts Plugin
Add Featured Image (4 posts)

  1. drizzle02
    Member
    Posted 7 months ago #

    I'm not sure if anyone else is having the same issue, but I was having issues where no featured image was uploaded. So I added this code to allow the youtube image to be uploaded via the url and added in the postmeta.

    Open this: core/parse.php

    Add this after line: 254 ( after the "WP_ayvpp_insert_post" function ):

    $last = wp_get_recent_posts('1');
    
    $url = "http://img.youtube.com/vi/".$i."/maxresdefault.jpg";
    $post_id = $last['0']['ID'];
    
    $desc = "Imported from Youtube";
    $thumb_nail_id = $post_id + 1;
    
    media_sideload_image($url, $post_id, $desc);
    add_post_meta($post_id,'_thumbnail_id', $thumb_nail_id);

    Also 'Comment' out line: 369 ( function update_post_meta )

    //update_post_meta($i,'_thumbnail_id',$tern_wp_youtube_array['_tern_wp_youtube_video']);

    http://wordpress.org/plugins/automatic-youtube-video-posts/

  2. martinmetzmacher
    Member
    Posted 7 months ago #

    Could you please include this in the plugin as an automatic option?

  3. Sutherland Boswell
    Member
    Posted 5 months ago #

    By default AYVP has some odd workarounds (like store the YouTube ID in the _thumbnail_id field), and I've had some trouble supporting it in my Video Thumbnails plugin, but I just released an update that hopefully is fully compatible. It should download the image to your media library and set it as a featured image. Let me know if it works for you!

  4. aftersix
    Member
    Posted 3 months ago #

    Can you release an update regarding this issue? TQ

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.