# Construction calculators in WordPress, with a block

> Install Craft Quantities Calculators from WordPress.org and add any calculator with a block or a shortcode. Every option, roles, WordPress.com and fixes.

Page: https://craftquantities.com/embeds/wordpress/ (embed guide). This is the page's Markdown copy; the HTML page is the canonical version.

The **Craft Quantities Calculators** plugin is in the official WordPress.org directory. It adds a block with a searchable list of the calculators and a `[craftquantities]` shortcode, and both fit the frame's height for you. Without the plugin, a Custom HTML block takes the plain snippet.

- Block + shortcode What it adds
- Automatic Height
- 6.0+WordPress
- Free Plugin and calculators

**On this page Before you start**

## Before you start

- A self-hosted WordPress site, version 6.0 or later, running PHP 7.4 or later.
- An account allowed to install plugins (an administrator on most sites).
- On WordPress.com: plugins, iframes and scripts need a paid plan with hosting features activated; on the free plan use a link to the calculator instead.

## Step by step

1. Find the plugin

   In the dashboard open **Plugins**, then **Add New Plugin**, and type `Craft Quantities Calculators` into the search box. Or open the [listing on WordPress.org](https://wordpress.org/plugins/craft-quantities-calculators/) to read it first.
2. Install and activate

   Click **Install Now** on the plugin's card, then **Activate**. It adds no settings page: everything is set on each block.
3. Add the block

   Edit a post or a page, click the **+** block inserter and search for `Craft Quantities`. Insert the **Craft Quantities Calculator** block where the calculator should appear.
4. Pick the calculator

   Type into the block's **Calculator** field to search the list (tile, deck, concrete…) and choose one; the editor previews it at once.
5. Set units, language, theme and height

   In the block's sidebar: **Units** pins metric or imperial, **Language** lists only the languages that calculator is published in, **Theme** forces light or dark, and a **Height** of `auto` fits the frame to the calculator.
6. Publish

   Update or publish the post and open it while logged out. The credit line, "Calculator by Craft Quantities", appears under the frame; keep it.

## Your code

_Shortcode (classic editor, widgets)_

```
[craftquantities calc="concrete-calculator" theme="auto" height="auto"]
```

Paste it into a post, a page or a text widget. The plugin frames the whole calculator; the compact format is for the plain snippet below.

_Custom HTML block (without the plugin)_

```
<iframe src="https://craftquantities.com/embed/?calc=concrete-calculator" width="100%" height="900" loading="lazy" style="border:1px solid #e4e4e7;border-radius:12px;max-width:100%" title="Concrete Calculator — Craft Quantities"></iframe>
<p style="margin:4px 0 0;font:12px/1.4 system-ui,sans-serif">Calculator by <a href="https://craftquantities.com/calculators/materials-quantities/concrete-calculator/">Craft Quantities</a></p>
<script>(function(){if(window.cqEmbedFit)return;window.cqEmbedFit=1;window.addEventListener("message",function(e){var d=e.data;if(!d||d.source!=="craft-quantities"||d.type!=="size"||typeof d.height!=="number"||!isFinite(d.height))return;var f=document.getElementsByTagName("iframe");for(var i=0;i<f.length;i++){if(f[i].contentWindow!==e.source)continue;var a=document.createElement("a");a.href=f[i].src;if(a.protocol+"//"+a.host!==e.origin)return;f[i].style.height=Math.min(6000,Math.max(200,Math.ceil(d.height)))+"px";return}})})();</script>
```

For a **Custom HTML** block: the frame, the credit line and the fitting script. WordPress removes iframes and scripts saved by users without the `unfiltered_html` capability, so an editor or administrator must save it.

Every other option is in the [full builder](https://craftquantities.com/embeds/#calculator=concrete-calculator).

## What visitors see

Your post · How much concrete for a shed slab?

Calculator by [Craft Quantities](https://craftquantities.com/calculators/materials-quantities/concrete-calculator/)

- [![The WordPress block editor with the Craft Quantities Calculator block selected: the concrete calculator's inputs in the post, and the block's settings for calculator, units, language, theme and height in the sidebar.](https://craftquantities.com/embeds/wordpress/screenshot-1.webp)](https://craftquantities.com/embeds/wordpress/screenshot-1.webp)

  _The block in the editor: pick a calculator from the searchable list, then set units, language, theme and height._
- [![The concrete calculator on a published post, worked out for a shed slab: the concrete with waste, then the bag counts, the edge forms and the sub-base lines.](https://craftquantities.com/embeds/wordpress/screenshot-2.webp)](https://craftquantities.com/embeds/wordpress/screenshot-2.webp)

  _A calculator on a published page, worked out as the reader types, with every result line._
- [![The same post on a phone: the calculator fills the column under the article's introduction.](https://craftquantities.com/embeds/wordpress/screenshot-3.webp)](https://craftquantities.com/embeds/wordpress/screenshot-3.webp)

  _The same calculator on a phone._

## Every shortcode option

The block's sidebar offers the same choices. Only `calc` is required; the rest fall back to the defaults shown.

**`calc`**

The calculator's slug, the last part of its address on this site, for example `concrete-calculator`. Required.

**`units`**

`imperial`, `metric` or `auto`. Default `auto`: the reader's own setting.

**`lang`**

`en`, `es`, `fr`, `pt` or `auto`. Default: the site's language. Where the calculator's translated page is published, the frame shows it; until then, the English calculator with the credit in your language.

**`theme`**

`light`, `dark` or `auto`. Default `auto`: follows the reader's system.

**`height`**

`auto` (default), which fits the calculator, or a number of pixels from 200 to 6000.

**`heading`**

`0` hides the calculator's own heading, for a page whose heading already names it.

**`credit`**

`follow` (default) or `nofollow`. The credit line is always shown; this only adds rel="nofollow" to its link.

## Troubleshooting

**The block is not in the inserter**

The plugin is installed but not active, or the search used another word. Activate it under **Plugins** and search the inserter for `Craft Quantities`.

**The iframe vanished after saving**

A Custom HTML block was saved by a user without `unfiltered_html`; contributors and authors lack it, and on a multisite network only super admins have it. Use the plugin's block, which needs no raw HTML.

**The calculator list in the block is empty**

Your server could not reach this site's public calculator list. The plugin then uses the copy bundled with it, so the block still works; try again later for calculators added since.

**The frame does not fit its content**

Set the height to `auto`. If an optimisation plugin delays or combines scripts, exclude the plugin's small fitting script from it, or give the block a fixed height.

**It does not work on WordPress.com**

WordPress.com allows plugins and iframes only on paid plans with hosting features activated. On other plans, link to the calculator's page instead.

## Why it helps

- A how-to post answers its own question: the reader types the measurements of their slab or room and gets the quantity, without leaving your article.
- Nothing to maintain: the frame is served from this site, so corrections and new calculators reach every post that embeds them.
- Privacy stays simple: the plugin and the frame set no cookies, show no ads and run no analytics.
- The plugin is GPL-licensed and listed in the official directory, so updates arrive through the dashboard like any other plugin's.

## Sources

Checked against these help pages on 26 November 2026.

1. [WordPress.org: Craft Quantities Calculators (plugin listing)](https://wordpress.org/plugins/craft-quantities-calculators/)
2. [WordPress documentation: Custom HTML block](https://wordpress.org/documentation/article/custom-html/)
3. [WordPress documentation: Roles and capabilities](https://wordpress.org/documentation/article/roles-and-capabilities/)
4. [WordPress.com support: Custom HTML block](https://wordpress.com/support/wordpress-editor/blocks/custom-html-block/)

On this page

At a glance

**What it adds**

Block + shortcode

**Height**

Automatic

**WordPress**

6.0+

**Plugin and calculators**

Free

Official links

- [The plugin on WordPress.org](https://wordpress.org/plugins/craft-quantities-calculators/)
- [Developer hub](https://craftquantities.com/developers/)
- [Static JSON API](https://craftquantities.com/api/)
- [Remote MCP server](https://craftquantities.com/developers/mcp/)
- [npm package](https://craftquantities.com/developers/npm/)

The one rule

Keep the visible credit line under the frame: it is the one condition of the free embed.

**Open:** the engine’s answers (its JSON API, MCP server and npm package), the data files under /api/v1/ and the formula library (/formulas/) are published under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/): reuse them, commercially too, crediting “Craft Quantities” with a link. **Reserved:** the page text, the design and the software, the engine’s code included. [The terms of use](https://craftquantities.com/terms/)

[The terms, in full](https://craftquantities.com/embeds/#terms)

[Home](https://craftquantities.com/)

Embed & integrations

Pages

- [Overview and builder](https://craftquantities.com/embeds/)
- [WordPress plugin](https://craftquantities.com/embeds/wordpress/)
- [Shopify](https://craftquantities.com/embeds/shopify/)
- [Wix](https://craftquantities.com/embeds/wix/)
- [Squarespace](https://craftquantities.com/embeds/squarespace/)
- [Webflow](https://craftquantities.com/embeds/webflow/)
- [Google Sites](https://craftquantities.com/embeds/google-sites/)
- [Blogger](https://craftquantities.com/embeds/blogger/)
- [Any HTML page](https://craftquantities.com/embeds/html/)

Developers & integrations

- [Overview and live call](https://craftquantities.com/developers/)
- [API reference](https://craftquantities.com/developers/api-reference/)
- [Static JSON API](https://craftquantities.com/api/)
- [Remote MCP server](https://craftquantities.com/developers/mcp/)
- [npm package](https://craftquantities.com/developers/npm/)
- [Command line](https://craftquantities.com/developers/cli/)
- [WebMCP in the browser](https://craftquantities.com/developers/webmcp/)
- [Claude and ChatGPT](https://craftquantities.com/ai/)
- [Embeds and WordPress](https://craftquantities.com/embeds/)
- [Browser extension](https://craftquantities.com/tools/browser-extension/)
- [Changelog](https://craftquantities.com/developers/changelog/)
- [Service status](https://craftquantities.com/status/)

On this page

- Before you start
- Step by step
- Your code
- What visitors see
- Every shortcode option
- Troubleshooting
- Why it helps
- Sources

---
Source: https://craftquantities.com/embeds/wordpress/
Craft Quantities: free to read, cite and link to; the pages are not licensed for republication. Quantities only: no prices, no design and no certification.
