GiveWP Campaign Donations Shortcode
The [givewp_campaign_donations] shortcode allows you to display donations for a Campaign anywhere shortcodes are supported on your website. This maximizes the exposure of your key campaigns to visitors and makes it easy to use GiveWP’s Campaigns with any page builder that supports shortcodes.
Example:
[givewp_campaign_donations campaign_id="5" show_anonymous="true" show_icon="true" show_button="true" donate_button_text="Donate now!" sort_by="top-donations" donations_per_page="2"]
Campaign Donations Shortcode Attributes
These attributes give you control over which Campaign the donations are from, what the donate button says, and how the donations are organized.
Campaign ID: (Required) Select which campaign the shortcode will display donations from. You can only display donations from one campaign at a time.
- Shortcode attribute: campaign_id
- Attribute values: a numeric value of the Campaign ID.
- Default behavior: None. If this attribute is not included in the shortcode, you will see an error on your page.
Show Anonymous: Choose whether or not to show donations given anonymously.
- Shortcode attribute: show_anonymous
- Attribute values: true, false
- Default behavior: If this attribute isn’t included in the shortcode, anonymous donations are shown. If the attribute is included but left empty, the anonymous donations are not shown.
Show Icon: Choose whether or not to show the donation icon.
- Shortcode attribute: show_icon
- Attribute values: true, false
- Default behavior: If this attribute isn’t included in the shortcode, the icon is shown. If the attribute is included but left empty, the icon is not shown.
Show Button: Choose whether or not to show the donate button.
- Shortcode attribute: show_button
- Attribute values: true, false
- Default behavior: If this attribute isn’t included in the shortcode, the button is shown. If the attribute is included but left empty, the button is not shown.
Donate Button Text: Type the text you’d like to use for the donate button.
- Shortcode attribute: donate_button_text
- Attribute values: your custom text
- Default behavior: If this attribute isn’t included in the shortcode, the button will say Donate Now by default.
Sort By: Sort donations in descending order by donation amounts or donation dates. Top-donations will list the donations from largest to smallest, and recent-donations will list them from most recent to least recent.
- Shortcode attribute: sort_by
- Attribute values: top-donations, recent-donations
Donations Per Page: Decide how many donations to show at once. Right now, there is no pagination for the Campaign Donations shortcode, but there may be in the future. So, the number you pick here currently determines how many total donations are shown.
- Shortcode attribute: donations_per_page
- Attribute values: single numerical value (example: 12)