This plugin hasn’t been tested with the latest 3 major releases of WordPress. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress. Loans Widget


The Loans Widget allows the user to display their public loans from on their blog via a sidebar widget. The user specifies their Kiva lender name, the number of loans (N) to show, and the size of the images that will be displayed. The widget then randomly selects N of the user’s loans from the Kiva API, and displays brief information about each of them… linking back to

If you have marked any of your Kiva loans as private, or have lent anonymously, your loans will not show up in the Kiva Loans Widget. Only public loans are available to the Loans Widget.

Important: This Kiva Widget requires your Kiva Lender Name. This is not your email that you use to login to! Your Kiva Lender Name is the name Kiva uses in the URL for your Kiva Lender Page. You can access and change your Kiva Lender Name via the last item on “My Lender Page” under “My Portfolio” on

The Loans Widget includes caching of the data collected from to prevent a call to Kiva on every page load. This cache clears once a day.

Version 4.1 includes text updates and aesthetic fixes

Version 4.0 includes text updates and testing up to WordPress 4.2.2.

Version 2.9 includes an important update that fixes a big problem that causes the kiva file cache to fill up and take up lots of space. Please upgrade asap!

Version 2.8 includes an important update that handles when the Kiva server is unavailable.

Version 2.7 includes an important upgrade that allows Kiva to track the widgets requests. Please
upgrade your copy of the Loans Widget.


  • The widget displayed on the side bar

  • The widget's admin control


How to install the Loans Widget plugin:

  1. Download the zip file from accessible from the WordPress Plugins space
  2. Upload and unzip into the plugins directory ( /wp-content/plugins/ ) on your server
  3. Activate the plugin through the .Plugins. menu in WordPress
  4. Add the widget to a sidebar via the .Widgets. page under the .Appearance. menu
  5. Set the options, and save your settings


Kiva Lender Name: Your Kiva Lender Name, from “My Lender Page URL” on Kiva

Number of loans: The number you Kiva loans you would like to be displayed

Image Size: The maximum width, or height (which ever is larger) of the image in pixels


What is

A micro-lending site applications.

Will it show private loans?

No, it will only show your public Kiva loans.

How do I change the look of the Kiva Loans Widget?

The style sheet is in the plugin folder at /wp-content/plugins/kiva-widget/style.css

What if I get the json_decode error?

If you get the following error:

Fatal error: Call to undefined function: json_decode() in

This error means that you do not have PHP JSON.s support installed on your server. JSON
support became a part of the PHP core in PHP 5.2.0. The best way to handle this error is to
upgrade your PHP to the newest stable available version. Most Linux distributions will have
packages for upgrading. On Windows, you can go to the PHP Downloads page. For more information,
check out the PHP JSON Manual.

What if I get the Permission Denied error

Warning: fopen( wp-content/plugins/kivaorg-widget/cache/kiva_cache_1241553368.txt)
[function.fopen]: failed to open stream: Permission denied

This error means that improper permissions are set within the Kiva widget directory on your
server. The directory .cache. within the widget must be writeable by your server.s web users.
You can fix this problem by changing the ownership of the directory .cache. to the web user.
Most likely one of the following command will work, if performed within the plugin directory
( wp-content/plugins ):

chown www-data:www-data kivaorg-widget/cache


chmod 777 /kivaorg-widget/cache

Why are the loan images not displaying?

Kiva has moved it’s images to a different location. Some images are unaffected, while others
will be missing in the plugin. Version 2.1 of this widget now handles these moved images. Please
upgrade to the newest version of the Loans Widget

Contributors & Developers

“ Loans Widget” is open source software. The following people have contributed to this plugin.