#FF0000 Raised £1,762 towards the £2,000 target.

Does your WordPress site need fundraising thermometers? Then look no further…

Simple to configure, and can be placed on any page or post with the simple shortcode:

[thermometer raised=1762 target=2000]

Multiple thermometers with different targets/sizes/amounts raised/currency symbols/alt text can also be placed on the same page.

Download plugin

Optional parameters

The plugin shortcode has 6 optional parameters: width/height, align, alt, trailing, fill, and currency:

[thermometer raised=523 target=1000 width=300 height=567 align=left currency=$ alt='Raised £523' trailing=false fill=#D318D6]

Width and height values are interpreted as pixels. The alt text can be toggled off by using ‘alt=off’. Currency can proceed the raised and target values by toggling ‘trailing’ to true or false. Unique thermometer fill colours can be assigned using hex values in the fill parameter.

Shortcodes

The plugin also supports the use of shortcodes to display text values of the amount raised and target value. Simply use [therm_r] or [therm_t] on any post or page. See the FAQ for instructions on how to use these in text widgets.

Donate

If you have found this plugin useful then please consider leaving a tip. Just follow the Paypal button below and enter the amount (GBP) you wish to pledge. Many thanks!


FAQ  (support forum)

  • I am able to save the thermometer settings but the image does not appear on my page or post.

First check you have typed the shortcode correctly. If it is still not working, try changing the permissions of the plugin folder to 777 (no need to recurse into subdirectories) then update the thermometer once more from the settings page.

  • I get an error message “Fatal error: Call to undefined function imagecreatefrompng…”

It is likely the GD library (required to create images) is not installed on your server – check by creating a phpinfo file and contact your hosting support.

  • The shortcodes don’t work in text widgets

WordPress only enables shortcodes in posts and pages by default.Edit the donations_therm.php file in the plugin folder, and add the following lines: if (!is_admin()) add_filter('widget_text', 'do_shortcode', 11); (Src:http://hackadelic.com/the-right-way-to-shortcodize-wordpress-widgets).

  • The [therm_r] and [therm_t] shortcodes show different values to the thermometers.

Values for these shortcodes are set on the Thermometer settings page. If you want your thermometers to display the same values, remove the ‘raised’ and ‘target’ parameters from the [thermometer] shortcode, e.g. [thermometer width=300 align=right].

  • Can I display the thermometer as a percentage of a parent container?

Yes – just add the percentage symbol to the shortcode value. For example, width=30%. As before, values can be set for Width OR height only. To display the thermometer using an absolute value, set width=320, NOT width=320px.

  • How do I use the title & alt attributes?

This alt parameter option will change the title and alt text attributes of the thermometer image. To toggle off, type alt=off. To enter custom text, type alt=’your custom text’ (include apostrophes). If the option is left out the default text ‘Raised £xxxx towards the £xxxx target.’ will appear.

  • Can I remove the currency symbol?

Yes! Select the empty option on the settings page dropdown menu, or enter currency=null in the thermometer shortcode, e.g. [thermometer currency=null].