How to Add A YouTube Video To a Post or a Page in Wordpress
Recently I learned how to add a video from YouTube to a Wordpress website on whatever page or post you want it displayed on. Are there any copyright concerns with doing this? My understanding is that it is perfectly legal and acceptable (If I'm not correct, somebody please let me know).
I'm not sure whether anyone else has already published training on how to do this, so if they have, please pardon the redundant training.
So let's get right into it. Look at my first picture below. I hope you can see it (there's a 540 pixel limit on picture size).
Okay, so after you navigate to a video you want on your website, pause the video if it's playing and then follow the numbered steps shown on the picture:
1. Click on "Share"
2. Click on "Embed", then under the line of code just below "Embed", click on "Show More"
3. Assuming you want a custom size like I do (because for my Wordpress theme 720 pixels works out really well for the width) click on "Custom size" within the "Video size" drop-down box. (You don't have to use a custom size, if you want you can just select one of the pre-set sizes.)
4. Fill in the number of pixels you want for the width, such as 720 or some other number that you like. Then click on "Return" or "Enter" on your computer keyboard. The height of the video that is compatible with the existing aspect ratio is then automatically calculated for you and fills in the box with that number. In my case it is 540 pixels for the height.
5. This next step is optional but I think it is important to do. Un-check the check-box labeled "Show suggested videos when the video finishes". you can choose to leave it checked if you really want to, but why would you want to? If you don't Un-check that box, then when your visitor finishes viewing the video in your website, he or she will see a window full of other suggested videos on YouTube, and then may get distracted into watching those rather than continuing to interact with your website. If you have affiliate links, ads, and other content that you want your visitor to focus on, why let that happen? Un-check that box!
6. Highlight and copy ALL the text in that string of text just above the "Video size" label. Note that its content is influenced by what you did in steps 3. through 5. so you must make your choices there before you do step 6.
Ok, now that you have finished grabbing what you need from YouTube, navigate to your Wordpress dashboard (I'm assuming you have gotten far enough in the Wealthy Affiliate training to know how to do that, but if not you should do that first and then come back to this).
See the picture below for the next steps.
Then navigate to your page or post where you want the video to appear. Click on "edit". Then place your cursor where you want the video to appear, typically at the end of whatever else is already there.
7. Next click on the tab just above the editing tool bar at the right side labeled "Text". This is where you will need to be careful because you are now directly editing the html code that defines that page or post. Don't mess with any of the existing code unless you are expert enough to know what you are doing with it!
8. If your cursor is holding a place at the end of your page or post because you have done the action in the sentence just before step 7 above, then you will see a single line of code at the bottom of the html text that says something like " ". Now that you are in the text editing mode from step 7, place your cursor just below all the other code and just above the " ". It's ok to add some blank lines for this if you like. Then paste the string of text you copied from YouTube in step 6 right there.
9. Click on "Update".
Then promptly switch back to the tab labeled "Visual" right next to the place where the 7 is pointing in the picture above, before you accidentally mess up something in the "Text" editing mode.
You're done! Now you and your website visitors can watch that video to your heart's content, right in the page or post where you added it.