官术网_书友最值得收藏!

  • WordPress 5 Complete
  • Karol Król
  • 464字
  • 2021-07-02 12:36:50

Adding videos to blog posts

Luckily for us, the process of adding a video to a standard blog post or page has been made more than easy. Let's discuss this step by step.

We'will create a whole new post for this. Let's use the title Great Baby Back Ribs Recipe. Creating the post itself is pretty basic.

1. Navigate to Posts | Add New. You'll see a screen that we've already covered earlier in this chapter.

2. Let's put some example content in place, and try including a video right away. All we need to do is copy and paste the URL of the video that we'd like to include in the content; just a standard copy-and-paste operation, and nothing else.

When copying the URL of the video, it's important to make sure that the link is copied as is in raw text form (not hyperlinked anywhere: that is, not clickable).

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. Here 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

However, something you'll notice right away as you're adding the video URL is that it's going to be turned into a live video block 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:

3. To give the post some more unique presence, let's add a new category, Recipes, and assign a new tag, video. After that, all we need to do is publish the post normally.

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 too, such as Vimeo, TED, Hulu, and WordPress.tv. To get the full list of supported platforms, please visit https://codex.wordpress.org/Embeds.

One more method of adding videos to blog posts is uploading the raw video files manually (instead of using a third-party platform such as YouTube). Even though this is possible in WordPress, 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 just did.

主站蜘蛛池模板: 苍梧县| 腾冲县| 通州区| 仁寿县| 乐平市| 如皋市| 雷波县| 政和县| 张家界市| 绵阳市| 思茅市| 淳安县| 恭城| 太谷县| 普安县| 锡林浩特市| 普洱| 海伦市| 三门县| 高阳县| 棋牌| 蓬安县| 通化县| 平武县| 麟游县| 和顺县| 鹿泉市| 宁武县| 阜康市| 南华县| 南江县| 雷波县| 克什克腾旗| 临颍县| 汝南县| 长海县| 叶城县| 平陆县| 道孚县| 广汉市| 深水埗区|