Display Donors List For Charitable WordPress Plugin

Today, I decided to use this great donation WordPress plugin for our non-profit website (iraniansptgh.com). We are doing a fundraising to attend the Pittsburgh’s Bicentennial Anniversary Parade and since I’m maintaining the website I decided to quickly look into the existing WordPress plugins that I could find for donations and create a webpage for our fundraising.

 

I decided to finally use Charitable fundraising plugin, about which I have to say it is a GREAT plugin. Even the free version gives you tons of features you can use for creating multiple compaings or receiving online or offline donations through the website and etc. However, we decided to show the donors list on the website sorted by the donations amount (hiding the donation amount for sure) and it seems the website doesn’t support such a feature. It does have a nice widget  but the widget has to be on a sidebar and sidebars are displayed in all pages!! Additionally it seemed to be impossible to hide the avatars which would make the list huge and large and mess up the pages’ design.

 

With all that said, I decided to create a short code for the plugin that lets you print the list of your donors any where you would like and gives you bunch of options including:

  • Compaign ID
  • Sort  which can have the values [none, asc,desc]
  • Sort Reference : the column value you would like to sort by that can have values [amount, first_name, last_name]
  • Display amount: which shows whether you want to show the the donation amount or not

You can use the short code like:

 

[donors cid=123 sort=”none” sortref=”amount” showamount=false]

 

You can find the code for the shortcode on [github] or just below. If you are planning to use it easily add it to the end of the file “./includes/shortcodes/class-charitable-campaigns-shortcode.php” just before the “endif”.

 

 

if you are wondering where to find cid, its the post id for your campaign.

2 comments On Display Donors List For Charitable WordPress Plugin

Leave a reply:

Your email address will not be published.

Site Footer