Get Related Posts to Search for Images From Custom Field?
-
Hi,
I’m trying to work out how and where to modify the Jetpack Related Posts module so that it will show Youtube thumbnails from a standard URL.
On the linked page of my site, you can see that I have installed a ‘featured video’ feature at the top of the post. This is generated by inputting the URL in a custom field ‘video_url’ on the post editor. (I used this method)
I understand that I need to extract the YT video ID to get a thumbnail via their api as well. But I am a novice with PHP and am struggling to fit all the pieces together. I notice that JP Related Posts will already pickup a YT thumbnail from an embedded video within the post – I am assuming it does this when looking through the Gutenberg blocks?
How would I modify the Jetpack module so that it would also look for the URL of this custom field, then feed it back to get a thumbnail?
Whilst I have an understanding, I am still a novice, so any help would be greatly appreciated!
Note: The example link shows 3 related posts, 2 have ‘featured videos’: I want the left-most one to grab a thumbnail from the youtube ‘featured video’ on that post, the middle one has a thumbnail from an embedded video – but again I want to take it from the featured video, the third is a standard image which works great!
The page I need help with: [log in to see the link]
- The topic ‘Get Related Posts to Search for Images From Custom Field?’ is closed to new replies.