How to Embed YouTube Videos in WordPress Posts?
WordPress is known as a flexible website management platform and it is used not only by average bloggers, but also media companies. Due to its significant versatility, there are many thousands of people who use WordPress as their primary platforms. WordPress is incredibly easy to use. The WYSIWYG interface is straightforward and people who can use Microsoft Word would learn to use it quickly. Writing a text-only post is easy enough for new bloggers, but adding videos can be quite confusing for many people. There are dozens of video-oriented plugins for WordPress and using them can make things look more complicated. However, WordPress will provide us with so many great options. Videos can be uploaded in YouTube and shared through WordPress interface. Another way is to store videos in our own hosting storage, so people could directly open them. We could start this by opening a new post and find two tabs for HTML and visual view. In order to embed videos properly, we will need to open the HTML view.
We could use the visual view later to preview our post. The next step is to get the embed code. YouTube and other major video sharing websites provide embed code for their videos. On YouTube, we can find the embed code under the video and if we click it , the HTML embed code will be highlighted. YouTube also offers additional options under the embed code. As an example, we are able to find size of video, show border, show related videos and others. The embed code will change automatically if we change one of the boxes. Then we will only need to paste the code in our post. After we do that, we could click preview and we will see that our videos are embedded in the post. The post can be given any title we want. We can add text after or before we embed the code. It is a good idea to play around with the code and perform some experiments with it. As an example, we may need an extra line break after or before the code to adjust the appearance. So, it is quite simple to embed a YouTube video in our website.
Unfortunately, there’s a possibility that the video is either too large or too small for our post. If we check the embed code, we could find that values for height and width are included. We could try to change the number to resize the video. The appropriate values depend on the design layout. As an example, we may want to choose 1.777 ratio to get widescreen aspect. However, this may not be a fixed ratio, we will need to perform fine adjustments. As an example, we may need to reduce the height to make room for the play menu bar. Other video sharing website also allow us to get embed code. Once we learn to do this, embedding videos from sharing websites is easy to do.