Wednesday, October 23, 2013

At present there is no subject that cannot be handled by WordPress . YouTube is the world’s largest video search engine, and play . So this is something that we need to embed YouTube videos in WordPress Blog postman . It is now? It means that there are a variety of WordPress plugins, WordPress blog post in which you easily can be embedded in the YouTube video. But you know, except for my wordpress plugin post Email this post I show management so that you do not use any type of plugin on your WordPress blog by just coding a post or page, the YouTube videos will be on display. To do this, you have to do is :
( WordPress coding at any time that the backup file that you edit.

1. First you go to your WordPress blog dashboard.
The . The theme of this work is that you want to select.
3 . You open the functions.php file.
4 . Copy the code below to the following.

/ *
    
Short code to display youtube thumbnail on your wordpress blog.
    
Usage:
    
[youtube_thumb id = "VIDEO_ID" img = "0" align = "left"]
    
VIDEO_ID = Youtube video id
    
img = 0,1,2 or 3
    
align = left, right, center
* /
function wp_youtube_video_thumbnail ($ atts) {
     
extract (shortcode_atts (array (
          
'id' =>'',
          
'img' => '0 ',
          
'align' => 'left'
     
), $ Atts));
    
$ align_class = 'align'. $ align;
    
return '<img src="http://img.youtube.com/vi/'.$id.'/'.$img.'.jpg" alt="" />';
}
add_shortcode ('youtube_thumb', 'wp_youtube_video_thumbnail');

5 . Copy the code and paste it into the functions.php file inside of the save .
I want to show you that post YouTube videos will be putting her in the back of this code .

[youtube_thumb id = "rNWeBVBqo2c" img = "0" align = "center"]

From the above code "rNWeBVBqo2c" by changing the code to your particular video will be putting.
Thank you very much.
Categories: , ,

0 comments:

Subscribe to RSS Feed Follow me on Twitter!