Solved

get YouTube video thumbnail from embedded video in Wordpress

Posted on 2016-08-03
7
21 Views
Last Modified: 2016-08-28
I'm setting up a query of posts in a Wordpress theme.  I'd like to make it as simple as possible and grab the thumbnail of the YouTube video embedded in the posts.

I am embedding the Youtube videos by copying the URL to the content editor.  

What I'd like to do, is be able to pull that video URL and use the thumbnail generator to display that videos thumbnail in the query list as a link image.

something like:

<img src="http://img.youtube.com/vi/<?php echo the_content; ?>/#.jpg

I'm not sure if that's possible or the best practice, but doesn't seem too far out of the realm of what may be already native in Wordpress and I'm just not looking in the right place.  Any suggestions?
0
Comment
Question by:axessJosh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 12

Expert Comment

by:William Nettmann
ID: 41741923
I doubt there is functionality in WordPress to do that directly, but this should put you on he right path:

http://tubularinsights.com/youtube-thumbnail-image/
0
 
LVL 7

Expert Comment

by:Alicia St Rose
ID: 41743514
Hi!
Why are you placing the post content in the image file path? You'd probably want to use a custom field for this.

As far as video thumbnails, I've used this plugin in the past:
https://wordpress.org/plugins/video-thumbnails/

Are you wanting the video image to be the featured image in your list of posts when you have a Video post? That's what this plugin can do for you?

You can also use custom fields and create a field for the video thumbnail image link you get from the tool William Nettmann pointed you to. Then you can use this variable in your query loop. Maybe just have a field for the Video ID and hardcode the rest of the URL in the template.

Advanced Custom Fields or Piklist are great for creating fields quickly!
0
 
LVL 2

Author Comment

by:axessJosh
ID: 41748177
yea, i figured it wasn't a native ability within wordpress and thought about custom fields which would do it for sure but i have a very needy client.  The fewer steps I give them the better.  

I was hoping to do some kind of PHP Explode or something (not even sure what I'm saying there) to be able to capture the Video ID from the url and use that to get the thumbnail.

any ideas?
0
Report: Liquid Web beats Amazon, Rackspace & More

A study by performance analyst firm Cloud Spectator finds that Liquid Web beats rivals Amazon, Rackspace and DigitalOcean when it comes to website and cloud application performance.

 
LVL 12

Expert Comment

by:William Nettmann
ID: 41748331
This expert suggested creating a Gigs project.
You have been given several ideas already - if you still don't know what to do, I suggest you consider posting a Gig and get someone to do it for you.
0
 
LVL 2

Author Comment

by:axessJosh
ID: 41749092
yes, and i think I alluded in my last comment that those ideas are good, but I was hoping to get more out of the content itself.

Is there a way to parse the URL out of the content and grab that video ID?
0
 
LVL 12

Accepted Solution

by:
William Nettmann earned 500 total points (awarded by participants)
ID: 41749235
0
 
LVL 12

Expert Comment

by:William Nettmann
ID: 41773569
The following question you participated in has been inactive for 14 days: get YouTube video thumbnail from embedded video in Wordpress

No new comments can be added to the question. You can still help resolve it by choosing the comment(s) with the most merit and following the prompts to close the question.
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Now that you've installed WordPress 2.9 (http://www.experts-exchange.com/articles/Web_Development/Blogs/WordPress/WordPress-2-9-What-to-Expect-When-Upgrading-to-WordPress-2-9.html?) on your site, you need to install some plugins to get the most out …
If you are looking for plug-ins to add functions to your WordPress small business web site, take some time to read though this comprehensive list.  These are all the plugins I use for my customers WordPress web sites, as well as my own.  Be sure to …
The purpose of this video is to demonstrate how to make a WordPress Site faster and smaller in size by cleaning up the database. This will be demonstrated using a Windows 8 PC. Plugin WP Optimize will be used. Go to your WordPress login page. T…
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question