# The shortcode

Source: https://uglydev.com/docs/functions/functions-the-shortcode/
Updated: 19 November 2026

```
[ugly-fields field="name"]
[ugly-fields field="name" post="12"]
[ugly-fields field="name" option="1"]
```

Prints a field inside content, the way `ugly_show()` does in a theme. It works while **Settings → Advanced → The [ugly-fields] shortcode** is on (it is on by default).

| Attribute | Meaning |
| --- | --- |
| `field` | The **Code name** of the field |
| `post` | The ID of another post |
| `option` | `1` to read an options page |

> **Note:** the shortcode is written by whoever writes the content (an author, a contributor) and read by anyone, so it never becomes a way to read what that person could not read. It prints nothing for another post the reader may not see, for a password field, or for a file the reader may not open.
