The [give_totals] shortcode allows you to display the earnings from multiple forms on your site. Multiple goals can be rolled into one and displayed with or without a progress bar. This documentation walks you through the various options and attributes that can be included there.

You may need to display the total current progress of a given form or collection of forms whether they have a progress bar enabled on them individually or not. The [give_totals] shortcode is made to enable you to do exactly that. You can display a combined total of any number of forms by listing their IDs, or by category or tag. You can additionally show a progress bar based on any total amount you designate with your own custom messaging as well. This is a very useful, practical, and flexible shortcode that you’ll find many uses for.

Screenshot showing the GiveWP shortcode builder modal open, with the give_totals options shown clearly.
The give_totals options within the GiveWP shortcode builder modal.

Using the Shortcode Builder with give_totals

The GiveWP shortcode builder allows you to generate the shortcode to your exact specifications. Within the builder you’ll have the following options:

  • “Donation Form IDs” — use this to list your GiveWP form IDs that you want to combine for the total. IDs must be comma separated.
  • “Total Goal” — you can set any goal you’d like to display.
  • “Message” — this is the inline text message to display your totals. To display the dynamic information of the total and the goal use {total} and {total_goal} respectively.
  • “Link” — If this is filled with a URL, a hyperlink will appear to encourage readers to go and donate.
  • “Show Progress Bar” — Show/Hide. This will output a progress bar, styled like our GiveWP progress bars. If you choose to show it, it will appear regardless of whether your forms have a progress bar enabled individually or not.

give_totals Shortcode Attributes

If you want to fine-tune your shortcode manually, here are the shortcode attributes that the shortcode builder outputs:

  • ids — the donation form IDs.
  • total_goal — the total goal amount.
  • message — the totals text message. Default is “Hey! We’ve raised {total} of the {total_goal} we are trying to raise for this campaign!”
  • link — the link url.
  • link_text — the text of the link. Default is “Donate Now”.
  • progress_bar — true/false. Displays or hides the progress bar.

There are a couple additional attributes that are not exposed in the shortcode builder that can be powerful as well:

  • cats — a comma separated list of GiveWP form category ids that you want to combine into one total.
  • tags — a comma separated list of GiveWP form tag ids that you want to combine into one total.


Give Totals Goal Shortcode Example

[give_totals ids="8, 10" total_goal="$10,000" message="Hey! We've raised {total} of the {total_goal} we are trying to raise for this campaign!" link="/go-here/" link_text="Donate!" progress_bar="true"]