推特is a platform that few bloggers and online marketers can ignore — the reach is just too good to pass up. If you manage to build a sizable follower base on Twitter, you can use it to drive tons of traffic to your WordPress website.

但是,此流量可以双向发展。如果您有网站访问者不知道您的Twitter存在,则添加社交媒体链接或嵌入式推文会为您的追随者提供帮助。或者,您可以提取一个档次,并在WordPress网站中添加完整的Twitter供稿。

使用嵌入式Twitter提要,您可以在时间轴显示中显示来自一个或多个用户或主题标签的多个推文。用户可以通过与这些嵌入进行交互,可以喜欢推文,共享推文并直接进入Twitter个人资料。Twitter提要还可以作为您为访客提供的社交活动的方便摘要。

In this post, we’ll show you two simple ways to put a Twitter feed on your WordPress website. First, we’ll walk through the process with a popular Twitter feed plugin. Then, we’ll explain another approach for those who prefer to keep their plugin count to a minimum.

Grow Your Business With HubSpot's Tools for WordPress Websites

使用WordPress Twitter提要插件将Twitter提要添加到WordPress

WordPress plugins存在使您的生活更轻松,而Twitter提要也不例外。有几个插件可以添加此类提要,但是在本指南中,我们将使用自定义Twitter提要Smash Balloon的插件。到目前为止,它是将Twitter提要嵌入WordPress中的最受欢迎的解决方案。使用此插件,可以轻松地使用快速代码放置饲料,并且Feed界面是可自定义,响应且对SEO友好型的。

我们将介绍如何使用自定义Twitter feed的免费版本,但请注意,有一个插件的Pro版本available starting at $49 annually for use on one website. Custom Twitter Feeds Pro lets you display Tweets from different accounts in the same feed, adds additional display options like轮播和幻灯片,并为您提供更多控制供稿中的节推文的控制。

但是就目前而言,免费版本中的核心功能足以在您的网站上进行实时饲料。就是这样:

1。Install and activate自定义Twitter提要plugin.

2。点击Twitter提要sin your dashboard menu. This opens up the配置menu for the plugin.

3。In the配置panel, click the blue登录to Twitter and get my Access Token and Secretbutton.

这configuration screen in the Custom Twitter Feeds twitter feed plugin

4。You will be temporarily taken to the Twitter site to authorize the Custom Twitter Feeds plugin to use your tweets. The plugin will not be able to post to Twitter, just read your tweets. Enter your Twitter credentials, then click授权应用程序

5。返回自定义Twitter提要配置面板,两个访问令牌and访问令牌Secretfields should be filled in for you. These codes are saved by the plugin.

这configuration screen in the Custom Twitter Feeds twitter feed plugin

6。在下面Feed Settings,首先选择您的提要类型。您可以创建一个供稿,以发布用户时间轴(以公共推文输入任何手柄),主题标签或家庭时间轴的推文,其中包括您关注的推文和推文。然后,选择要在WordPress Twitter feed中显示的推文以及插件访问推文的频率。

这feed settings menu in the Custom Twitter Feeds twitter feed plugin

7。完成后配置, click theCustomize在页面顶部的标签。在下面Customize, you can modify the contents of the feed display, including the width, height, and layout (in the pro version) of the feed, as well as add custom CSS. You can also choose to hide certain components of the tweet such as the avatar image, date, and Twitter logo.

这customize screen in the Custom Twitter Feeds twitter feed plugin

8.完成后Customize, click theStyle在页面顶部的标签。In theStyle选项卡中,您可以修改更多的提要显示设置莱克阀门e colors, date and time, and text size and weight. You can also opt to disable links in the tweet text.

这style screen in the Custom Twitter Feeds twitter feed plugin

9.完成后Style, click the保存更改button near the bottom of the page.

10.点击这显示您的提要在页面顶部的标签。此页面列出了您可以使用的短代码将嵌入式Twitter提要放在网站上。对于此示例,我们将仅使用顶部提供的基本快捷代码:[习惯式喂养]。复制此快捷代码。

这display options menu in the Custom Twitter Feeds twitter feed plugin

11。The Custom Twitter Feeds shortcode can be put in a page, post, or widget. To add your feed to a page or post, paste the shortcode in aShortcodeGutenberg block.

a twitter feed shortcode placed in a gutenberg block

或者,您可以与Twitter提要Gutenberg block (added by the plugin) — search for and choose the block, and you’ll see the feed appear in the editor.

Twitter Feed Gutenberg块

要将供稿放在小部件中,请选择Appearance > Widgets,添加一个Text小部件到您所需的页面区域,将短代码粘贴到文本框中,然后单击Save

放置在页脚小部件中的Twitter提要短代码

12。通过激活的Twitter提要预览您的新页面/帖子。这是什么HubSpot的Twitter提要looks like with the plugin (no customizations added).

a preview of a twitter feed embedded in a wordpress post

在没有插件的情况下,将Twitter提要添加到WordPress

如果你宁愿避免插件路线,Twitterso lets you embed a feed with an embedding link. You have to handle most of the visual customizations with your own CSS, but the process is otherwise straightforward.

1。Twitter发布, a Twitter-owned website that provides URLs for embedding its content.

2。Paste the URL of the feed you want to embed in the box, then click the arrow icon.

这twitter publish homepage

3。选择嵌入式时间表as your display option.

display options for twitter publish

4。推特will generate embed code for your feed. To customize your feed display, click theset customization options link然后设置您的宽度和高度,主题和语言。然后,单击Updatebutton.

embed code provided by twitter publish

5。点击复制代码

6。To add your embed code to a page or post with the Gutenberg editor, insert aCustom HTML阻止并粘贴您刚刚复制的嵌入代码。

Twitter提要嵌入代码粘贴在WordPress的HTML Gutenberg块中

要将供稿放在小部件中,请选择Appearance > Widgets,添加一个Custom HTML小部件到您所需的页面区域,将嵌入代码粘贴到Content盒子,然后单击Save

twitter feed embed code pasted in a custom html widget in wordpress

7。通过激活的Twitter提要预览您的新页面/帖子。这是什么HubSpot的Twitter提要looks like with Twitter’s embed code.

preview of a twitter feed embedded in a wordpress post

Everything in Moderation (Yes, Even Twitter)

无论您喜欢插件还是手动方法,在WordPress网站上显示Twitter feed都是一个好主意。它有助于增加网站上的用户参与度和在Twitter上的关注者。

As a final note, be sure not to overdo it with your feed. Unless your WordPress site is purely a funnel to your Twitter account, your feed should come secondary to your site’s main content, whether you write blog posts, sell a product, or both. Twitter feeds and social buttons are great for keeping visitors up-to-date, but they shouldn’t distract or impede the user experience.

Editor's note: This post was originally published in January 2020 and has been updated for comprehensiveness.

Use HubSpot tools on your WordPress website and connect the two platforms  without dealing with code. Click here to learn more.

Use HubSpot tools on your WordPress website and connect the two platforms  without dealing with code. Click here to learn more.

Originally published Jun 8, 2021 7:00:00 AM, updated June 08 2021

主题:

WordPress插件