如何在WordPress博客文章中嵌入实际推文

Do you want to embed individual tweets in your WordPress blog posts? Embedding Tweets in your blog posts allows you to easily quote tweets inside your posts as well as make them more engaging.

您是否要在WordPress博客帖子中嵌入个人推文? 在博客文章中嵌入推文使您可以轻松地在帖子中引用推文,并使它们更具吸引力。

You may have seen many popular blogs and news websites embedding tweets from organizations and individuals in their articles.

您可能已经看到许多受欢迎的博客和新闻网站,在其文章中嵌入了来自组织和个人的推文。

It makes the quotes more authentic while allowing your users to follow the full conversations for more information.

它使报价更真实,同时允许您的用户关注完整的对话以获取更多信息。

In this article, we will show you how to easily embed tweets in WordPress blog posts and pages.

在本文中,我们将向您展示如何轻松地在WordPress博客文章和页面中嵌入推文。

How to Easily Embed Tweets in WordPress Blog Posts
在WordPress帖子中嵌入实际推文-逐步介绍 (Embedding Actual Tweets in WordPress Posts – Step by Step)

WordPress makes it easy to embed third-party services in your blog posts. This includes YouTube videos, Facebook updates, Tweets, and many more items.

WordPress使您可以轻松地将第三方服务嵌入您的博客文章中。 这包括YouTube视频 ,Facebook更新,推文以及更多其他项目。

This feature uses a method called oEmbed. Basically, you can just add the URL of a third-party website, and WordPress will request an embed code from them.

此功能使用一种称为oEmbed的方法。 基本上,您只需要添加第三方网站的URL,WordPress就会向他们请求嵌入代码。

You can only add whitelisted oEmbed services in WordPress, and Twitter is one of those services.

您只能在WordPress中添加列入白名单的oEmbeded服务,而Twitter是其中之一。

The new WordPress block editor has added even more user-friendly options to embed tweets in WordPress.

全新的WordPress区块编辑器添加了更多用户友好选项,可将推文嵌入WordPress。

It comes with a built-in Twitter embed block to let you easily insert tweets in your posts and pages.

它带有内置的Twitter嵌入块,可让您轻松地在帖子和页面中插入推文。

Let’s take a look at how to embed tweets in WordPress blog posts.

让我们看一下如何在WordPress博客文章中嵌入推文。

First, you need to go to Twitter and find the tweet that you want to embed.

首先,您需要转到Twitter并找到要嵌入的推文。

Next, click on the down arrow icon on the right, and then select ‘Copy link to Tweet’ option.

接下来,单击右侧的向下箭头图标,然后选择“将链接复制到Tweet”选项。

Copy Link to Tweet

After that, you will see ‘Link copied.’ message on the top. Now you need to paste the link in your WordPress editor.

之后,您将看到“链接已复制”。 顶部的消息。 现在,您需要将链接粘贴到WordPress编辑器中。

Tweet Link Copied

Create a new post or open an existing post from your WordPress dashboard, and then click ‘Add New Block’ button. Next, you will need to choose the ‘Twitter’ block under ‘Embeds’ section.

创建新帖子或从WordPress仪表板打开现有帖子,然后单击“添加新阻止”按钮。 接下来,您需要在“嵌入”部分下选择“ Twitter”块。

Add Twitter Embed Block in WordPress Editor

You’ll now see the Twitter Embed block added into the post edit area. You need to paste the Twitter URL that you copied earlier in the block settings.

现在,您将看到Twitter Embed块添加到帖子编辑区域中。 您需要在块设置中粘贴先前复制的Twitter URL。

Embed Twitter in WordPress Post Editor

WordPress will now automatically fetch and display the actual tweet in your post content.

WordPress现在将自动获取并在您的帖子内容中显示实际的推文。

Actual Tweet Embedded in WordPress Post

You can save your post or publish it to see a live preview.

您可以保存您的帖子或将其发布以查看实时预览。

This is how it looked on our demo website.

这就是我们的演示网站上的样子。

Actual Tweet Embedded in WordPress Blog Post Preview

Pro Tip: You can also paste the Tweet URL in a paragraph block and WordPress will automatically convert it into a Twitter embed block.

专家提示:您也可以将Tweet URL粘贴在段落块中,WordPress会自动将其转换为Twitter嵌入块。

Auto embed tweets by just pasting the URL
如何在经典WordPress编辑器中嵌入推文 (How to Embed Tweets in Classic WordPress Editor)

If you are still using the old WordPress classic editor, then you will need to copy and paste the tweet link directly in the post editor.

如果您仍在使用旧的WordPress经典编辑器 ,则需要直接在帖子编辑器中复制并粘贴tweet链接。

Unlike the block editor, the classic editor is a single text box for your whole content.

与块编辑器不同,经典编辑器是整个内容的单个文本框。

That’s why you need to paste the tweet URL in a separate line in the editor.

这就是为什么您需要在编辑器中的单独行中粘贴推文URL。

Add Twitter URL in Classic WordPress Editor

Once done, it will immediately load the actual tweet in your post editor.

完成后,它将立即在您的帖子编辑器中加载实际的推文。

Tweet Embedded in Classic WordPress Editor

Now you can save and preview your post.

现在,您可以保存和预览您的帖子。

That’s it! It’s pretty simple and quick.

而已! 非常简单快捷。

We hope this article helped you to learn how to embed actual tweet in WordPress blog posts. You may also want to see our guide on how to easily embed videos in WordPress blog posts.

我们希望本文能帮助您学习如何在WordPress博客文章中嵌入实际的推文。 您可能还想查看我们的指南,以了解如何轻松地将视频嵌入WordPress博客文章中

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

如果您喜欢这篇文章,请订阅我们的YouTube频道 WordPress视频教程。 您也可以在TwitterFacebook上找到我们。

翻译自: https://www.wpbeginner.com/plugins/how-to-embed-actual-tweets-in-wordpress-blog-posts/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值