- WordPress Complete(Sixth Edition)
- Karol Król
- 514字
- 2021-07-02 18:30:15
Adding videos to blog posts
Luckily for us, the process of adding a video to a standard blog post or page has been made as easy as possible. Let's discuss this step by step.
We're going to start by creating a whole new post. The title we can use is, Great Baby Back Ribs Recipe. Creating the post itself is pretty basic. All you need to do is navigate to Posts | Add New. You'll see a screen that we've already covered earlier in this chapter. Let's put some example content in place, and try including a video right away. All we have to do in order to achieve this is copy and paste the URL of the video that we'd like to have included in our content. Just a standard copy-and-paste, and nothing else.
The example I'm going to use here is the video at http://www.youtube.com/watch?v=hDyHbTxTL-A.
As you would have guessed, it's a nice video recipe for some baby back ribs! So in order to include this video in a blog post, all I need to do is take its URL and just paste it in. This is the raw-text content of the new post that I'm working on now:
Here's a great video recipe for some killer baby back ribs:
http://www.youtube.com/watch?v=hDyHbTxTL-A
(by Laura Vitale)
Now, when I save such a post, the URL of the video will be turned into a live video automatically. This will happen both on the front page of the website and even on the Edit Post screen itself. Refer to the following screenshot:

To give the post some more unique presence, I also added a new category, Recipes, and I assigned the post to a new content type, Video. This is done through the sidebar on the Edit Post screen. We will talk more about different content types later in this chapter. Take a look at the following screenshot:

The process described here explains how to embed YouTube videos and make them a part of your blog posts, but the same goes for other popular platforms like Vimeo, TED, Hulu, WordPress.tv, and others. To get the full list of the supported platforms, please visit https://codex.wordpress.org/Embeds.
One more method of adding videos to blog posts, which we left out initially, is uploading the raw video files manually (instead of using a third-party platform like YouTube). Although this is possible in WordPress, you can drag and drop a video file just like you'd do with an image, it's not a recommended solution. Video files are always quite large in size, and having them hosted on your standard web server can become very expensive (bandwidth costs), should the video become popular and end up being viewed by thousands of people. It's a lot more efficient and user-friendly to just upload your video to YouTube or a similar platform, and then have it embedded on your site, like we've explained a minute ago.
- 國際大學(xué)生程序設(shè)計競賽中山大學(xué)內(nèi)部選拔真題解(二)
- Java EE 6 企業(yè)級應(yīng)用開發(fā)教程
- GeoServer Cookbook
- Rust實戰(zhàn)
- 單片機C語言程序設(shè)計實訓(xùn)100例:基于STC8051+Proteus仿真與實戰(zhàn)
- Software Testing using Visual Studio 2012
- ASP.NET Core Essentials
- 數(shù)據(jù)庫系統(tǒng)原理及MySQL應(yīng)用教程
- Visual Basic程序設(shè)計教程
- Hands-On Full Stack Development with Go
- GitHub入門與實踐
- 跟戴銘學(xué)iOS編程:理順核心知識點
- HTML+CSS+JavaScript網(wǎng)頁制作:從入門到精通(第4版)
- Android編程權(quán)威指南(第4版)
- Java RESTful Web Service實戰(zhàn)