# Shortcodes & embeds

## Shortcode

```
[calorie_calculator]
```

### Useful Free attributes

| Attribute | Values | Default |
|-----------|--------|---------|
| `unit` | `usunit` / `metricunit` / `both` | `both` |
| `template` | `general` / `bootstrap-general` / `plain` / `old` | Look & feel default |
| `show_name_field` | `true` / `false` | `true` |
| `show_email_field` | `true` / `false` | `true` |
| `show_firstname_only` | `true` / `false` | `false` |
| `goal_ui` | `lines` / `dropdown` | Behaviour default (else `lines`) |

Example:

```
[calorie_calculator unit="metricunit" template="general"]
```

In PHP themes:

```php
echo do_shortcode( '[calorie_calculator]' );
```

## Other embeds

- **Block editor** — Calorie Calculator block
- **Elementor** — Calorie Calculator widget (Calorie Calculator category)
- **Classic widget** — Appearance → Widgets

Prefer the block or Elementor widget when available. Use **Calorie Calculator → Embed** for the shortcode builder and classic sidebar notes.
