The [charitable_donors]
shortcode allows you to display a list of donors to one or all of your campaigns on a page. It uses the same frontend template as the Donors widget, so its output is similar — it just provides you with flexibility to show the Donors in different spots.
Parameters
number
Number of donors to show. Default is10
.orderby
May bedate
,donations
oramount
. Default isdate
.order
May beASC
(ascending order) orDESC
(descending order). Default isDESC
.campaign
May be set to the ID of a campaign,current
to display the donors to the campaign currently being viewed, orall
or0
to display donors to any campaign. Default is0
(donors to any campaigns).distinct_donors
Only show unique donors. May be set to0
(don’t show distinct) or1
(show distinct). If a donor has donated more than once, they will only appear in the list once, with their donation amount calculated based on all their donations. Default is0
.orientation
May bevertical
orhorizontal
. Default ishorizontal
.show_name
Whether the name should be shown. May be1
(show) or0
(don’t show). Default is1
.show_location
Whether the donor’s location should be shown. May be1
(show) or0
(don’t show). Default is0
.show_amount
Whether the donor’s donated amount should be shown. May be1
(show) or0
(don’t show). Default is1
.show_avatar
Whether the donor’s avatar should be shown. May be1
(show) or0
(don’t show). Default is1
.hide_if_no_donors
Whether the shortcode should display anything if no one has donated yet. May be1
(hide) or0
(don’t hide). Default is0
.
Plus, if Gift Aid is activated and on version 1.1 or above, the following setting is available:
show_gift_aid
Whether to display the Gift Aid amount for the donation. May be1
(show) or0
(don’t show). Default is0
.
Usage
Default usage:
[charitable_donors]
Show donors to the current campaign (to be used on a campaign page):
[charitable_donors campaign=current]
Show donors to a specific campaign (replace 123 with the ID of the campaign):
[charitable_donors campaign=123]
Show a donor leaderboard, ordered by amount donated:
[charitable_donors orderby=amount]
Show donors in a vertical list:
[charitable_donors orientation=vertical]
Only show donor’s names (hide amount, location and avatar):
[charitable_donors show_name=1 show_location=0 show_amount=0 show_avatar=0]
Show the Gift Aid amount for a donor’s donation (requires Charitable Gift Aid 1.1+):
[charitable_donors show_gift_aid=1]