How to display a thumbnail from a Youtube using a shortcode

How to display a thumbnail from a Youtube using a shortcode

Are you often displaying Youtube videos on your blog? If yes, what about displaying a preview thumbnail to your readers? Here is a great shortcode that will display a thumbnail from a Youtube video, using Youtube api.

First, you need to create the shortcode. To do so, copy the code below and paste it into your functions.php file.

Once done, you can use the shortcode. It accept 3 parameters: The video ID, the image size (0 for 480*360px, 1 for 120*90) and the image alignment.

1 Comment

Trackbacks

  1. Autoapprove List 5 years ago

    Singles night clubs…

    Hi my friend! I want to say that this post is awesome, nice written and include almost all significant infos. I�d like to see more posts like this ….

Leave a reply

Your email address will not be published. Required fields are marked *

*