Description
Half of your readers think in grams and Celsius, the other half in cups and Fahrenheit. Catalonec Unit Converter shows both.
Inline conversions with a shortcode
[unitflip value="350" from="F"] shows **350 °F (177 °C)**.
[unitflip value="2" from="cups" to="ml"] shows **2 cups (473.2 ml)**.
If you leave out to, Catalonec Unit Converter picks the usual metric or imperial counterpart (°F °C, lb kg, mi km, cups ml, and so on).
Interactive converter block
Add the “Unit Converter” block (or the [unitflip_converter category="temperature"] shortcode) and visitors can convert any value themselves. It works on phones, has a swap button and is keyboard and screen-reader friendly.
Categories
Length, weight, temperature, volume (including cups, tablespoons, teaspoons, fluid ounces, pints, quarts, US and UK gallons), area, speed, pressure, energy (calories and kilojoules), power, fuel economy (L/100 km, km/L, mpg) and data size.
Settings
Choose the number of decimals and the display style: 350 °F (177 °C), 350 °F / 177 °C, or only the converted value with the original on hover.
Lightweight and private
No external requests, no tracking, no cookies, no database tables. The script loads only on pages that contain a converter.
Catalonec Unit Converter Pro add-on
A separate, optional add-on is available that converts measurements already written in your posts automatically (no shortcodes needed), adds a metric/imperial switch for visitors, and converts cups of common baking ingredients to grams. Everything described above stays free in this plugin.
For developers
Filters: unit_flip_units (add categories or units), unit_flip_symbols, unit_flip_counterparts, unit_flip_category_labels.
Blocks
This plugin provides 1 block.
- Unit Converter An interactive metric/imperial unit converter.
Installation
- Install the plugin from Plugins Add New, or upload the
catalonec-unit-converterfolder to/wp-content/plugins/. - Activate it.
- Use the
[unitflip]shortcode in your text or add the “Unit Converter” block. Options are in Settings Catalonec Unit Converter.
FAQ
-
Which unit names can I use?
-
Short keys like
F,C,kg,lb,oz,cup,tbsp,tsp,ml,l,mi,km,ft,m,in,cm,mph,kmh,psi,bar,kcal,kJ,mpg,l100, plus common spellings such asfahrenheit,pounds,cupsorkm/h. -
What happens with a typo in the shortcode?
-
The original text is shown unchanged, so your post still reads correctly.
-
Can I use a comma as the decimal separator?
-
Yes.
value="1,5"works, and results follow your site’s number format. -
Does it convert cups of flour to grams?
-
Cups to grams depends on the ingredient, so this plugin converts volume to volume (cups to ml). Ingredient-aware conversion is part of the Pro add-on.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“Catalonec Unit Converter – Metric & Imperial” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “Catalonec Unit Converter – Metric & Imperial” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.0.1
- Renamed to Catalonec Unit Converter (new slug and text domain).
1.0.0
- First release.
