• Resolved rechazame

    (@rechazame)


    Hello again ??

    I have a form which creates posts programmatically and these posts contain YouTube video URL in a custom field.

    For some reason, after a post is created, it doesn’t have a featured image. Only after manually entering the edit mode and clicking Update, does the feature image is set by Video Thumbnails.

    How can I have the featured image set automatically?

    P.S – The settings allow automatic featured image, of course.

    https://www.ads-software.com/plugins/video-thumbnails/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Sutherland Boswell

    (@sutherlandboswell)

    Is this a form you’ve created yourself?

    When a form creates a post programmatically and then saves the custom fields using a function like update_post_meta(), Video Thumbnails will have already checked the post for a video when the wp_insert_post() function was used. To solve this, simply run get_video_thumbnail( $post_id ) after you’ve run update_post_meta().

    Thread Starter rechazame

    (@rechazame)

    Yes, it’s a form I have created myself and just like you said, I fire update_post_meta() after wp_insert_post() so as you said – URL have already been searched for.

    get_video_thumbnail( $post_id ) is a function of VT, right? haven’t heard of it…

    Plugin Author Sutherland Boswell

    (@sutherlandboswell)

    Yes, it is mentioned in the installation section but not in great detail. Using it should solve your problem.

    Thread Starter rechazame

    (@rechazame)

    I will try that. Awesome plugin and support bro. Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Featured images not showing automatically even when set’ is closed to new replies.