Thread Starter
Olib
(@olib)
Regarding my second question, a better solution may be to modify Quick Featured Images so that it doesn’t set a featured image if my custom link field contains a video URL.
Is there a function or piece of code that I could implement that would check whether the URL is a video URL supported by your plugin?
Thread Starter
Olib
(@olib)
I have managed to modify USP Pro to enable front end posting with Video Thumbnails, hurrah.
Therefore my only outstanding issue is preventing quick featured images from overwriting a video thumbnail. I believe I found the function in that plugins code that replaces the image, so I just need code that will stop it from executing if the custom link field contains a video URL.
Hey
Are you you able to share what you did to get it working with front end posting – I’m having the same issue…
Thanks,
Thread Starter
Olib
(@olib)
After reading through this post https://wordpress.org/support/topic/frontend-posts-do-not-generate-video-thumbnails and the posts linked to within it, I realised that Video Thumbnails just wasn’t being asked to do anything when a user submits a post.
I had to insert get_video_thumbnail( $post_id ); into the front end plugin (in my case, USP Pro), after the post (and custom field, if you’re using one for the video link) has been created.
As for my other issue of compatibility with Quick Featured Images, the issue I had was that Quick Featured Images were set before my custom field was inserted into a post when using the front end plugin. Therefore Video Thumbnails would try to set a featured image, find there already was one, and do nothing.
To get around this I modified the Video Thumbnails code so that it doesn’t overwrite an image unless the image contains a certain string. I’ve then named all of my “default” featured images with the same naming structure, so that they can be overwritten.
I now have a heirachy for featured images like this: User uploaded image > Video Thumbnail > Default image for a specific tag (Quick featured images) > no image.