Youtube videos embedded into wordpress posts
Within Wordpress there are many different really neat functions which are very easy to implement on your website. Some require a little coding some require a simple copy and paste once a plugin is activated.
Unlike some CMS such as Drupal you don’t need to spend hours doing this. i.e in Drupal you could possibly need 3-6 other plugins just to get a simple thing to work.
Let use the standard functionality of Wordpress.
How to embed YouTube into your posts
Login into your administration area: http://www.yourdomain.com/wp-login.php
Goto Posts> All Posts which should be in the top left hand side of admin area.
Find the post your wanting to add YouTube to and click on Edit.
Goto YouTube and click on the share and then Embed. The following should appear:
Make sure you use the correct video size i.e you want it to fit within the template of your website.
For example if it’s a special post been created for small videos you will need to change the width and height to the size recommend from your web developer. In this case the width= 220 height=165.
<strong></strong><iframe src="http://www.youtube.com/embed/b6u_Eqrr1lY" frameborder="0" width="220" height="165"></iframe>
So you will see that in the image above I changed it from 560 x 315 to 220x165. You can do this by using the drop down on video size and choose Custom Size.
Then copy the link.
Go back to your Wordpress post and then click on the html tab.
And in the text edit part just paste the link. Then simply click on the Visual tab and you will see a yellow square.
Don’t worry this is how it should look. You then just need to click on Publish or Update and the video will work.
To preview the video just click on View post.
Update 2021 for Embedding
Wordpress has moved on massively since writing this original posts. The latest version of Wordpress 5.7 has all kinds of useful features which include if you past the Youtube URL or any URL containing a video it will automatically pull the player needed to view the video. There are also widgets you can used called "Blocks" which can be dragged and dropped into any post or page.
Download this as a PDF