开发者 | ensignrolaren |
---|---|
更新时间 | 2024年7月20日 13:49 |
PHP版本: | 3.0.1 及以上 |
WordPress版本: | 6.6 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
[yardagecalc rounding="hundredths"]
I've also included calculations for circular and right triangular areas– just modify the shortcode like this:
CIRCLE
[yardagecalc type="circle"]
TRIANGLE
[yardagecalc type="triangle"]
The calculator has no dependencies, adds ✨nothing✨ to your WordPress dashboard, and is style agnostic.
/wp-content/plugins/
directory, or install the plugin through the WordPress plugins screen.[yardagecalc]
to add the calculator wherever you want it. Alternatively, you could also include the form in a page template with php. Just add the following wherever you want the calculator to appear: <?php echo do_shortcode("[yardagecalc]"); ?>
Sure! Just add rounding="hundredths"
to your shortcode, like so:
[yardagecalc rounding="hundredths"]
Yes! Just add type="circle"
or type="triangle"
to your shortcode. Examples:
CIRCLE
[yardagecalc type="circle"]
TRIANGLE
[yardagecalc type="triangle"]
Optionally, you may change the text on the form labels by adding attributes to your shortcode. For example, if you wanted to change just the label on the result field, you would use the following shortcode:
[yardagecalc result_label="Your custom text here"]
Just replace the text inside the quotes with your own text. Wrapping your custom text in quotes, as in the example above, is necessary to ensure your labels display properly.
Here's examples of all three calculation types with ALL the labels customized:
RECTANGLE
[yardagecalc form_label="Your custom text here" length_label="Your custom text here" width_label="Your custom text here" depth_label="Your custom text here" result_label="Your custom text here"]
CIRCLE
[yardagecalc type="circle" form_label="Your custom text here" radius_label="Your custom text here" depth_label="Your custom text here" result_label="Your custom text here"]
TRIANGLE
[yardagecalc type="triangle" form_label="Your custom text here" base_label="Your custom text here" height_label="Your custom text here" depth_label="Your custom text here" result_label="Your custom text here"]
You can choose to replace or translate the text on all, some, or none of your fields. If you want to use the default text on a label, just leave that attribute out of the shortcode. The bare shortcode [yardagecalc]
will use the default labels for all fields.
Yes! Just choose the shortcode block type and type the [yardagecalc]
shortcode exactly as you would using the classic editor.
calc()
to tyc_calc()
to prevent possible conflicts with other plugins