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.
The plugin shortcode has many optional parameters to control thermometer width, height, tick alignment, currency, alt text, the thousands separator, currency symbol position, fill colors, or to include a legend. For example:
[thermometer raised=523 target=1000 width=300 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 or colorRamp parameter.
Custom CSS rules
Editable CSS rules provides further customisable options, allowing the thermometer graphic to seamlessly blend with any site theme.
The plugin also supports the use of shortcodes to display text values of the amount raised and target value. Simply use
[therm_%] on any post or page. See the FAQ for instructions on how to use these in text widgets. The thermometer’s raised value can also update dynamically using other plugin shortcodes. For example:
[thermometer raised='my_shortcode' target=1000]
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. Or if you are using the Brave browser you can tip BAT by clicking the Rewards icon on the right side of the address bar. 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).
[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.