Creating a Paypal Donate Widget in WordPress – Without a PluginBy Binny V A • Jun 20th, 2009 • Category: Tutorials, WordPress
Paypal donate plugins. This is extremely simple to implement – you don’t even have to edit the code to get this done.
Open the admin side of your blog and go to Appearance > Widgets. Now add a Text widget to the sidebar you want the widget in. Edit it and paste the HTML code from the Paypal site.
<form name="_xclick" action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_xclick"> <input type="hidden" name="business" value="firstname.lastname@example.org"> <input type="hidden" name="item_name" value="Donation"> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="amount" value="25.00"> <input type="image" src="http://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"> </form>
Make sure you use your own paypal ID in the business field.
Save the widget – and you’re done.
Another method is to add the same code to the theme’s code directly. Usually in the
sidebar.php file. I kind of prefer this method – but it involves code editing, FTP, etc. Not everyone is comfortable with this.
Last but not the least, you can embed the code directly into a post. This is perhaps the simplest of all. Below is a working sample of the code…