Title: Tiny Yardage Calculator
Author: ensignrolaren
Published: <strong>2016 年 8 月 9 日</strong>
Last modified: 2026 年 5 月 19 日

---

搜索插件

![](https://ps.w.org/tiny-yardage-calculator/assets/banner-772x250.png?rev=2767102)

![](https://ps.w.org/tiny-yardage-calculator/assets/icon-128x128.png?rev=2767102)

# Tiny Yardage Calculator

 作者：[ensignrolaren](https://profiles.wordpress.org/ensignrolaren/)

[下载](https://downloads.wordpress.org/plugin/tiny-yardage-calculator.zip)

 * [详情](https://cn.wordpress.org/plugins/tiny-yardage-calculator/#description)
 * [评价](https://cn.wordpress.org/plugins/tiny-yardage-calculator/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/tiny-yardage-calculator/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/tiny-yardage-calculator/#developers)

 [支持](https://wordpress.org/support/plugin/tiny-yardage-calculator/)

## 描述

A simple form to calculate how many yards of material (such as bark mulch, soil,
concrete, gravel, etc) are needed to cover square feet to a given depth in inches.

By default, the calculator is for rectangular areas. User enters length and width
in feet and depth in inches; the calculator returns yards of material needed, rounded
up to the nearest whole number. You can also round to two decimal places (hundredths)
by adding a parameter to the shortcode, like this:

    ```
    [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.

## 屏幕截图

[⌊How to add the calculator to any page using the shortcode [yardagecalc]⌉⌊How to
add the calculator to any page using the shortcode [yardagecalc]⌉[

How to add the calculator to any page using the shortcode `[yardagecalc]`

[⌊How the calculator appears when you add it to a page with no custom css styling.
It will fit whatever CSS styles you use, so by default it should fit in with your
theme.⌉⌊How the calculator appears when you add it to a page with no custom css 
styling. It will fit whatever CSS styles you use, so by default it should fit in
with your theme.⌉[

How the calculator appears when you add it to a page with no custom css styling.
It will fit whatever CSS styles you use, so by default it should fit in with your
theme.

## 安装

 1. Upload the plugin files to the `/wp-content/plugins/` directory, or install the
    plugin through the WordPress plugins screen.
 2. Activate the plugin.
 3. Use the shortcode `[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]");?
    >`

## 常见问题

### Can I adjust the calculator to round values to two decimal points (hundredths place)?

Sure! Just add `rounding="hundredths"` to your shortcode, like so:

    ```
    [yardagecalc rounding="hundredths"]
    ```

### Can I calculate areas that aren’t rectangular, like circles and right triangles?

Yes! Just add `type="circle"` or `type="triangle"` to your shortcode. Examples:

**CIRCLE**

    ```
    [yardagecalc type="circle"]
    ```

**TRIANGLE**

    ```
    [yardagecalc type="triangle"]
    ```

### How do I change the text on the form labels?

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.

### Does this plugin work with the block editor?

Yes! Just choose the shortcode block type and type the `[yardagecalc]` shortcode
exactly as you would using the classic editor.

## 评价

![](https://secure.gravatar.com/avatar/c10d0c980bbe3f92394e3cf383a9aa34991a44f09e9874499430cd264c81525d?
s=60&d=retro&r=g)

### 󠀁[Widget is not working](https://wordpress.org/support/topic/widget-is-not-working-10/)󠁿

 [gmkws](https://profiles.wordpress.org/gmkws/) 2022 年 8 月 5 日 17 回复

**edit** The Author has contacted me and has been nothing but helpful!! I have just
installed this plugin and see nothing in the admin. I applied the short code, and
the widget appears, but it is not working. I input numbers, and nothing happens.

![](https://secure.gravatar.com/avatar/04dc9a68710712fdedf7be55b05a8d4ca3a07963b14e36e05c6e50f43c2b6dea?
s=60&d=retro&r=g)

### 󠀁[Version 1.1 is perfect](https://wordpress.org/support/topic/version-1-1-is-perfect/)󠁿

 [bcooper78](https://profiles.wordpress.org/bcooper78/) 2022 年 8 月 3 日

With the added ability to customize the verbiage shown, it went from 5 to 10 stars
in my eyes! Works great, matches into the page beautifully, thank you again!

![](https://secure.gravatar.com/avatar/9da2163eeef77598ceeb814a2b2028e8303bbfa590a9093032a6a54d8c6cd17a?
s=60&d=retro&r=g)

### 󠀁[Perfectly simple!](https://wordpress.org/support/topic/perfectly-simple-26/)󠁿

 [ekfritz](https://profiles.wordpress.org/ekfritz/) 2020 年 7 月 20 日 1 回复

So easy to use, minimalist styling adapted well to my site without hassle.

![](https://secure.gravatar.com/avatar/8fbeb8c79a9b19ace0b94ce105db3dc25d75f46c43d579bb1903d441ff7a23c7?
s=60&d=retro&r=g)

### 󠀁[Excellent](https://wordpress.org/support/topic/excellent-9003/)󠁿

 [hoochie](https://profiles.wordpress.org/hohori/) 2020 年 4 月 28 日 1 回复

What a time saver this plugin was for me. Thanks

 [ 阅读所有4条评价 ](https://wordpress.org/support/plugin/tiny-yardage-calculator/reviews/)

## 贡献者及开发者

「Tiny Yardage Calculator」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ ensignrolaren ](https://profiles.wordpress.org/ensignrolaren/)

[帮助将「Tiny Yardage Calculator」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/tiny-yardage-calculator)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/tiny-yardage-calculator/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/tiny-yardage-calculator/)，或通过
[RSS](https://plugins.trac.wordpress.org/log/tiny-yardage-calculator/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/tiny-yardage-calculator/)。

## 更新日志

#### 1.2

 * Added two new calculator types, circle and triangle
 * Changed default function name from `calc()` to `tyc_calc()` to prevent possible
   conflicts with other plugins
 * Added option to return values rounded to two decimal places (hundredths place)
 * Added some classes to form elements to make it easier to style the form with 
   your own CSS

#### 1.1

 * Added shortcode attributes to be able to optionally customize calculator field
   labels

#### 1.0

 * Published plugin

## 额外信息

 *  版本 **1.2.4**
 *  最后更新：**3 周前**
 *  活跃安装数量 **300+**
 *  WordPress 版本 ** 3.0.1 或更高版本 **
 *  已测试的最高版本为 **7.0**
 *  语言
 * [English (US)](https://wordpress.org/plugins/tiny-yardage-calculator/)
 * 标签
 * [calculate](https://cn.wordpress.org/plugins/tags/calculate/)[calculator](https://cn.wordpress.org/plugins/tags/calculator/)
 *  [高级视图](https://cn.wordpress.org/plugins/tiny-yardage-calculator/advanced/)

## 评级

 5 星（最高 5 星）。

 *  [  4 条 5 星评价     ](https://wordpress.org/support/plugin/tiny-yardage-calculator/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/tiny-yardage-calculator/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/tiny-yardage-calculator/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/tiny-yardage-calculator/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/tiny-yardage-calculator/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/tiny-yardage-calculator/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/tiny-yardage-calculator/reviews/)

## 贡献者

 *   [ ensignrolaren ](https://profiles.wordpress.org/ensignrolaren/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/tiny-yardage-calculator/)