Kiva.org Sidebar Widget
The Kiva.org sidebar widget was my first venture into the world of WordPress development. Quite taken with the concept of microloans and Kiva.org, I decided to create something that would spread the word.
Being my first foray into PHP, I was a little trepidatious… I was a pro with Perl by that time, but the need for play with PHP took a while to crop up. I had heard it was a somewhat dangerous language, with no explicit typing and the like… but hey, I love Perl, so I couldn’t point fingers for such things. I do find the mixing of HTML with PHP a little odd & difficult to keep tidy, but I enjoy PHP’s flexibility & speed.
Kiva.org WordPress Widget Settings
The widget settings asks you for your Kiva.org, username. This is from your lender page which you decide in the Kiva account settings, under ‘My lender page URL’.
You can see the Kiva.org widget in action on the sidebar to the left. The images appear quite large in this theme at the settings I have set, which are pictured to the left.
Aesthetic aspects of the widget can be can easily be changed with custom css. I recommend the Simple Custom CSS plugin to add any custom css to your WordPress site. It ensures your css is added last so that it overrides all other css, and allows you to update your theme without worry about losing your custom css.
I recently released version 4.2, which uses WordPress’s built in wp_remote_get() rather than curl to get the loans data from Kiva.org, which is much better practice, ensuring that the plugin works on any server, whether or not Curl is installed. This feature wasn’t a part of WordPress when I first released this widget.