wordpress個人網(wǎng)站添加使用支付寶自助捐款功能
以wordpress4.3.1為例:
打開網(wǎng)站后臺短曾,在外觀→編輯里面找到呜袁,邊欄這個sidebar.php文件,
在這個sidebar.php文件最下面:復制添加支付寶提供的代碼如下:
<form action="[https://shenghuo.alipay.com/send/payment/fill.htm](https://shenghuo.alipay.com/send/payment/fill.htm)" method="POST" target="_blank" accept-charset="GBK">
<input name="optEmail" type="hidden" value="你的支付寶賬號"/>
<input name="payAmount" type="hidden" value="默認捐贈你的金額"/>
<input id="title" name="title" type="hidden" value="默認的付款說明"/>
<input name="memo" type="hidden" value="默認的備注"/>
<input name="pay" type="image" value="轉賬" src="[https://img.alipay.com/sys/personalprod/style/mc/btn-index.png](https://img.alipay.com/sys/personalprod/style/mc/btn-index.png)"/></form>
保存就可以了肝劲,如果不夠美觀可以在兩邊加<center></center>
屬性就行了。
下面是預覽效果圖:
我的博客就是用這個方法交播。