wordpress文本框_如何在您的WordPress帖子中将点击添加到推文框中

wordpress文本框

Have you seen those beautiful quote boxes on popular sites which encourage users to tweet? These click to tweet quote boxes are very effective in increasing your site engagement and getting more shares on Twitter. In this article, we will show you how to add click to tweet boxes in your WordPress posts and pages.

您是否在受欢迎的网站上看到那些鼓励用户发推文的精美报价框? 这些单击鸣叫的报价框对于提高您的网站参与度并在Twitter上获得更多份额非常有效。 在本文中,我们将向您展示如何在WordPress帖子和页面的“ tweet”框中添加单击。

How to Add Click to Tweet Boxes in Your WordPress Posts
影片教学 (Video Tutorial)

演示地址

If you don’t want to watch the video tutorial, then you can continue reading the text version below:

如果您不想观看视频教程,则可以继续阅读以下文本版本:

First thing you need to do is install and activate the Better Click To Tweet plugin. For more details, see our step by step guide on how to install a WordPress plugin.

您需要做的第一件事是安装并激活“单击以更好地鸣叫”插件。 有关更多详细信息,请参阅有关如何安装WordPress插件的分步指南。

Upon activation, the plugin will add a new menu item labeled ‘Better Click to Tweet’ to your WordPress admin bar. Clicking on it will take you to plugin’s settings page.

激活后,该插件将在您的WordPress管理栏中添加一个名为“更好的点击发送消息”的新菜单项。 单击它会将您带到插件的设置页面。

Better Click to Tweet plugin settings

On the settings page, first you need to provide your Twitter handle. It will be used inside the tweets like this ‘via @wpbeginner’. This will help you see the conversations and tweets from your Twitter account.

在设置页面上,首先需要提供Twitter句柄。 它将像“通过@wpbeginner”这样在推文中使用。 这将帮助您查看来自Twitter帐户的对话和推文。

Next, if you want to use the your own custom short URLs, then check the box next to ‘Use short URL’ option.

接下来,如果您要使用自己的自定义短网址 ,则选中“使用短网址”选项旁边的框。

Don’t forget to click on the save changes button to store your settings.

不要忘记单击“保存更改”按钮来存储您的设置。

在WordPress帖子中向“ Tweet”框添加点击 (Adding a Click to Tweet Box in WordPress Posts)

Now that you have setup the plugin, you are ready to add click to tweet boxes and quotes to your WordPress posts and pages.

现在,您已经设置了插件,您可以将点击添加到tweet框,并将引号添加到WordPress的帖子和页面

Head over to create a new post or edit an existing one.

前往创建新帖子或编辑现有帖子。

The plugin comes with a simple shortcode to add click to tweet boxes anywhere in your posts or pages. Simply add the shortcode like this:

该插件带有一个简单的短代码 ,可在您的帖子或页面中的任何位置添加单击到tweet框。 只需添加如下的简码:

[bctt tweet="Text of the tweet goes here"]

[bctt tweet="Text of the tweet goes here"]

Here is how it would look on your website.

这是您网站上的外观。

Preview of a Click to Tweet box in a WordPress post

The plugin will automatically add a link back to your post as well as your Twitter handle to the post when a user clicks to tweet.

当用户单击鸣叫时,该插件会自动将链接添加回您的帖子以及您的Twitter句柄。

The shortcode comes with some extra parameters to help you customize the tweet box.

简码带有一些额外的参数,可帮助您自定义推文框。

For example, you would notice that the linked ‘click to tweet’ button is not a nofollow link. You can change that to a nofollow link by adding a nofollow attribute to the shortcode like this:

例如,您会注意到链接的“单击以鸣叫”按钮不是nofollow链接。 您可以通过向短代码添加nofollow属性,将其更改为nofollow链接,如下所示:

[bctt tweet="Text of the tweet goes here" nofollow"yes"]

[bctt tweet="Text of the tweet goes here" nofollow"yes"]

You can also change the anchor text of the button by adding prompt parameter to the shortcode like this:

您还可以通过将提示参数添加到短代码中来更改按钮的锚文本,如下所示:

[bctt tweet="Text of the tweet goes here" prompt="tell a friend"]

[bctt tweet="Text of the tweet goes here" prompt="tell a friend"]

Change click to tweet button text

If for some reason you don’t want to include the post URL or your Twitter handle into the tweet, then the plugin also allows you to do that as well.

如果由于某种原因您不想在推文中包含帖子URL或Twitter句柄,那么该插件还允许您执行此操作。

You will just need to add your url and via parameters to the shortcode, like this:

您只需将您的网址和通过参数添加到短代码中,如下所示:

[bctt tweet="Text of the tweet goes here" url="no" via="no"]

[bctt tweet="Text of the tweet goes here" url="no" via="no"]

更改“单击以鸣叫”框的外观 (Changing Appearance of Click to Tweet Box)

This plugin actually comes with a premium addon that has more styles that you can use for your click to tweet box.

该插件实际上带有一个高级插件,该插件具有更多样式,可用于单击鸣叫框。

It also allows you to easily add custom rules using CSS.

它还允许您使用CSS轻松添加自定义规则。

Simply connect to your WordPress site using an FTP client and go to /wp-content/plugins/better-click-to-tweet/assets/css/ folder.

只需使用FTP客户端连接到您的WordPress网站,然后转到/ wp-content / plugins / better-click-to-tweet / assets / css /文件夹。

Now locate the bcttstyle.css file and download it to your computer.

现在找到bcttstyle.css文件并将其下载到您的计算机。

Next, you need to go to /wp-content/uploads/ folder on your website and then upload the bcttstyle.css file from your computer.

接下来,您需要转到网站上的/ wp-content / uploads /文件夹,然后从计算机上载bcttstyle.css文件。

You can now edit this file and any changes you make will be reflected in all click to tweet boxes on your website.

现在,您可以编辑此文件,您所做的任何更改都会反映在您网站上的所有单击鸣叫框中。

Another way to do that is by copying the contents of the plugin’s CSS file and pasting them as custom CSS in your theme using the customizer. This way you can easily edit the CSS more easily with live preview.

另一种方法是复制插件CSS文件的内容,然后使用定制程序将它们粘贴为主题中的自定义CSS 。 这样,您可以通过实时预览更轻松地编辑CSS。

We hope this article, helped you learn how to easily add click to tweet box to your WordPress posts and pages. You may also want to see our list of most wanted Twitter hacks and plugins for WordPress.

希望本文对您有所帮助,以帮助您学习如何轻松地将“单击发送到鸣叫”框添加到WordPress帖子和页面中。 您可能还希望查看我们的WordPress最受欢迎的Twitter hacks和插件列表。

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-add-click-to-tweet-boxes-in-your-wordpress-posts/

wordpress文本框

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值