How to put a video in a middle position on WordPress – WordPress has a cool feature that can automatically display videos that have an embed code. And by using a video URL on YouTube, WordPress can automatically display videos properly.
But when you want to display an embed video on the WordPress site in your post, the video cannot appear in the right position, which is in the middle. Maybe you as a new user feel frustrated when you want to post a video on your WordPress site and find the video is displayed in the left position and looks less attractive. Maybe you have a video looking like this in your post.
The picture above shows that the YouTube video that I embed is not in the middle position and looks unattractive. And here I will provide quick tips that will help you to position the embed video so that it is in the center position.
Putting Embed Video In Middle Position in WordPress
But this method only applies if you put a video in your post with an embed code, not just copying the URL of the video.
Once you have the embed code, go ahead and go to your post and go to the “Text” tab of the editor, and paste your embed code in the position you want. And then add the following code to bit the embed code of the video.
<div style="text-align: center;"> disini letak kode embed video </div>
So that the whole code looks like this:
<div style="text-align: center;"><iframe src="https://www.YouTube.com/embed/1KahlicghaE" width="532" height="325" frameborder="0" allowfullscreen="allowfullscreen"></iframe></div>
And the results of the installation of the code above make the video now in the right position, namely the video position in the middle. You can’t straighten the video by clicking the “align center” format button on the visual editor tab, but you still have to add code using the manual method on the text editor tab. And the result will be like the image below.
And the method is just like that, a fairly simple method but you will often use it.
Make Videos Appear Full Width
Putting the video in the middle position is indeed a pleasant position to watch but maybe some users don’t like that method and prefer to post a video that is full width so that there is no free space on the right and left of the video.
If you want to embed a full and visible video on your posts, you can do that using the embed code as well. On YouTube (or wherever), you can change the embed video to be a larger size. YouTube makes this very convenient. You just need to enter the size into the width you want, and it will automatically adjust the height for you to save the same ratio video.
For example, I want to put a video in my post that has a width of 600px, so I will select the video size “Customize Size” and enter a size of 600 in the first column. And after that, just copy the embed code above the video preview. And then paste in the position according to your wishes.
(You will notice that YouTube has several common sizes already available in the pull-down menu. You will need to select “Custom size” if you want to adjust the size to your liking).
* Note: If you choose to use a full-width video according to the width of your post, then you don’t need to add the code above. You only need to paste the video embed code and then publish your writing. At this time, you too can start using the WordPress Gutenberg editor which features a much easier way to embed YouTube videos in WordPress.
Above is a way to put a video embed in the middle position and set a full-width video on WordPress, I hope this simple article was useful for you and good luck with the tutorial above. 🙂