wordpress简捷按钮_如何在WordPress中添加PayPal捐赠按钮

wordpress简捷按钮

Are you looking to add a donate button on your WordPress site? PayPal makes it super-easy to accept donations on your website. In this article, we will show you how to add a PayPal donate button in WordPress.

您是否要在WordPress网站上添加捐赠按钮? 贝宝让您轻松地在您的网站上接受捐赠。 在本文中,我们将向您展示如何在WordPress中添加PayPal捐赠按钮。

Donations

Many bloggers and non-profits add PayPal donate buttons on their WordPress sites. This allows them to cover the cost of running their blog and/or generate funds for their cause. If you wanted to add a PayPal donate button in your sidebar or donation pages, then you’re in the right place.

许多博客作者和非营利组织在其WordPress网站上添加了PayPal捐赠按钮。 这使他们能够支付运行博客和/或为自己的事业筹集资金的成本。 如果您想在侧边栏或捐赠页面中添加PayPal捐赠按钮,那么您来对地方了。

Note: Method 1 only works with self-hosted WordPress.org sites. If you want to add a PayPal donate button on your WordPress.com sites, then use method 2 to manually add the code. (See the difference between free WordPress.com vs WordPress.org)

注意:方法1仅适用于自托管的WordPress.org网站。 如果要在WordPress.com网站上添加PayPal捐赠按钮,请使用方法2手动添加代码。 (查看免费WordPress.com与WordPress.org之间的区别)

影片教学 (Video Tutorial)

演示地址

If you don’t like the video or need more instructions, then continue reading.

如果您不喜欢该视频或需要更多说明,请继续阅读。

Before you start, the first thing you need to do is create a PayPal account. If you already have one, then simply login to it as you will need the information later in the article.

开始之前,您需要做的第一件事就是创建一个PayPal帐户 。 如果您已经拥有一个,则只需登录即可,因为您将在本文后面需要此信息。

方法1:使用插件在WordPress中添加贝宝按钮 (Method 1: Adding a PayPal Button in WordPress using a Plugin)

The easiest way to add a PayPal donate button in WordPress is to use one of the many free PayPal donation plugins.

在WordPress中添加PayPal捐赠按钮的最简单方法是使用许多免费的PayPal捐赠插件之一。

Start by installing and activating the PayPal Donations plugin. Upon activation, you need to visit Settings » PayPal Donations to configure the plugin.

首先安装并激活PayPal捐赠插件。 激活后,您需要访问设置»PayPal捐赠来配置插件。

Settings page for PayPal Donations plugin

First you would need to provide your PayPal email that you used to create your account and then choose a currency.

首先,您需要提供用于创建帐户的PayPal电子邮件,然后选择一种货币。

You can also have the option to provide a custom donation page URL from your PayPal account as well as provide a return URL where users will be redirected to after they have made the donation such as a Thank You page.

您还可以选择从您的PayPal帐户提供自定义捐赠页面URL,以及提供返回URL,在捐赠后用户将被重定向到该URL,例如“谢谢”页面。

You can create a WordPress page to thank the donors and then enter the page’s URL as the return page.

您可以创建一个WordPress页面来感谢捐助者,然后输入页面的URL作为返回页面。

As for donation options, you can add a fixed amount, purpose, and reference for your PayPal donations. Lastly, you can select a PayPal button style. Once you are done, simply save your settings.

至于捐赠选项,您可以为PayPal捐赠添加固定的金额,目的和参考。 最后,您可以选择PayPal按钮样式。 完成后,只需保存您的设置。

Select a button to display

Now you can display your PayPal donate button using the shortcode [paypal-donation] in any WordPress post or page.

现在,您可以在任何WordPress帖子或页面中使用简码[paypal-donation]显示您的PayPal捐赠按钮。

Alternatively, you can visit Appearance » Widgets section in your WordPress admin and add PayPal Donations button to a sidebar.

或者,您可以访问WordPress管理员中的“ 外观»小部件”部分,并将“贝宝捐赠”按钮添加到侧边栏中。

PayPal Widget in a WordPress sidebar

The widget has the same settings, so all you need to do is provide a title and text for the donation widget and save your widget settings.

该小部件具有相同的设置,因此您所要做的就是为捐赠小部件提供标题和文本并保存您的小部件设置。

免费的WordPress PayPal捐赠插件 (Free PayPal Donations Plugins for WordPress)

PayPal Donations plugin are by far the easiest and simplest method to add a donate button for beginners. However, since there are plenty of PayPal plugins available, it can be confusing. We have hand-picked the best PayPal donate plugins that you can use.

PayPal捐赠插件是迄今为止为初学者添加捐赠按钮的最简单方法。 但是,由于有很多可用的PayPal插件,因此可能会造成混淆。 我们精心挑选了您可以使用的最好的PayPal捐赠插件。

If you want more than just a donate button, then check out our list of the 10 WordPress PayPal plugins for easily accepting payments. These plugins will not only help you collect donations, but you can also use them to sell digital content, services, and even physical goods.

如果您不仅需要捐赠按钮,请查看我们的10个WordPress PayPal插件列表, 以轻松接受付款 。 这些插件不仅可以帮助您收集捐款,还可以使用它们来销售数字内容,服务,甚至是实物商品。

方法2:在WordPress中手动添加贝宝按钮 (Method 2: Manually Adding a PayPal Button in WordPress)

Since WordPress.com does not allow you to install plugins, you have to manually add a PayPal donate button to your WordPress.com site.

由于WordPress.com不允许您安装插件,因此您必须手动将PayPal捐赠按钮添加到WordPress.com网站。

This method also works for any WordPress user who does not want to install a plugin.

此方法也适用于所有不想安装插件的WordPress用户。

Start by logging in to your PayPal account, and click on the Tools menu item. On the next page, click on the PayPal buttons icon.

首先登录到您的PayPal帐户,然后单击“工具”菜单项。 在下一页上,单击PayPal按钮图标。

PayPal Buttons under the tools section

On the next page, you will need to click on a link to create a new common button in the right hand side.

在下一页上,您需要单击链接以在右侧创建一个新的通用按钮。

Creating a new PayPal button

On the button creation page, you need to choose donations under the button type. After that choose the currency, amount, etc. Once you are satisfied with the settings, simply click on the ‘Create Button’.

在按钮创建页面上,您需要在按钮类型下选择捐赠。 之后,选择货币,金额等。对设置满意后,只需单击“创建按钮”。

PayPal Create a Donate Button

On the next page, you will see the code you need to display the PayPal donate button. Click on the Email Tab because this option will allow for more customization options. Paste this URL in a Notepad or another text editor.

在下一页上,您将看到显示PayPal捐赠按钮所需的代码。 单击“电子邮件”选项卡,因为此选项将允许更多自定义选项。 将此URL粘贴到记事本或其他文本编辑器中。

PayPal Link for the Donate Button

Next go to your WordPress admin area and edit a post or page where you want to add the PayPal donate button. It’s important that you’re in the Text Editor mode not the visual editor mode. Then copy and paste this code:

接下来,转到您的WordPress管理区域,然后编辑要添加PayPal捐赠按钮的帖子或页面。 重要的是,您处于文本编辑器模式而不是视觉编辑器模式。 然后复制并粘贴以下代码:


<a href="Your Email URL that you got from PayPal" target="_blank" rel="nofollow"><img src="https://www.paypal.com/en_US/i/btn/x-click-but21.gif" alt="" /></a>

Make sure to replace “Your Email URL that you got from PayPal” with the link that you pasted in your notepad in the step above.

确保将“您从PayPal获得的电子邮件URL”替换为您在上述步骤中粘贴到记事本中的链接。

That’s all. You now have a PayPal donate button in your WordPress sites without a plugin.

就这样。 现在,您的WordPress网站中有一个没有插件的PayPal捐赠按钮。

You can also paste the code inside a WordPress text widget to add it on your sidebar.

您还可以将代码粘贴到WordPress文本小部件内,以将其添加到侧边栏。

Here’s a live example of the donate button:

这是捐赠按钮的实时示例:

Donate to WPBeginner

Feel free to click on it to see how it works. You can make a donation to help us if you found this article helpful

:)

随时单击它以查看其工作原理。 如果您认为这篇文章对您有帮助,可以捐款帮助我们

定制选项 (Customization Options)

The reason why we chose the email link instead of the Website form code is so you can easily customize the donation image. Below are some other official PayPal donate buttons. Simply copy the code and replace the image section in your main code above.

我们选择电子邮件链接而不是网站表单代码的原因是,您可以轻松自定义捐赠图片。 以下是其他一些官方的PayPal捐赠按钮。 只需复制代码,然后在上面的主代码中替换图像部分。

<img src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" alt="" />

<img src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" alt="" />

<img src="https://www.paypal.com/en_US/i/btn/btn_donate_SM.gif" alt="" />

<img src="https://www.paypal.com/en_US/i/btn/x-click-but21.gif" alt="" />

<img src="https://www.paypal.com/en_US/i/btn/x-click-but04.gif" alt="" />

<img src="https://www.paypal.com/en_US/i/btn/x-click-but11.gif" alt="" />

If you don’t like any of these images, then you can create your own. Simply upload that image into your WordPress media library and get the File Link. Next add that link in the code below:

如果您不喜欢这些图像,则可以创建自己的图像。 只需将该图像上传到您的WordPress媒体库中并获取文件链接。 接下来,在以下代码中添加该链接:

<a href="Your Email URL that you got from PayPal" target="_blank" rel="nofollow"><img src="The Image URL" alt="" /></a>

We hope this article helped you add a PayPal donate button in WordPress. You may also want to checkout our guide on how to add a Stripe donate button in WordPress.

我们希望本文能帮助您在WordPress中添加PayPal捐赠按钮。 您可能还需要查看有关如何在WordPress中添加Stripe donate按钮的指南。

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/beginners-guide/how-to-add-a-paypal-donate-button-in-wordpress/

wordpress简捷按钮

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值