---
id: gatey-shortcodes
title: Shortcodes
slug: /gatey/shortcodes
sidebar_position: 10
description: "Full reference for the [gatey] and [gatey-account] shortcodes—parameters, defaults, and copy-pasteable examples."
tags: [gatey, wordpress, shortcode, authenticator, cognito, sso]
hide_title: true
---
## Shortcodes

Gatey provides WordPress shortcodes to embed Cognito-powered authentication widgets or display user attributes.

---

### `[gatey]`

Embeds an `<Authenticator>` anywhere: in posts, popups, or Elementor templates.

#### Attributes

| Attribute | Values | Description |
|---|---|---|
| `id` **(required)** | Gutenberg pattern ID | Which saved Gutenberg pattern (with an `<Authenticator>`) to render. Not for event targeting—use a CSS `id` for JS hooks. |
| `screen` | `signIn`, `signUp`, `editAccount`, `setupTotp`, `forgotPassword`, `changePassword` | Initial screen to show. |
| `variation` | `default`, `modal` | Inline widget vs. modal overlay. |
| `colormode` | `light`, `dark`, `system` | Colour scheme selection. |
| `language` | `ar`, `de`, `en`, `es`, `fr`, `he`, `hi`, `id`, `it`, `ja`, `ko`, `kr`, `nb`, `nl`, `pl`, `pt`, `ru`, `sv`, `th`, `tr`, `ua`, `zh` | Force the UI language. Omit to let the browser/OS preference decide. |
| `direction` | `auto` (default), `ltr`, `rtl` | Text direction. |
| `showopen` | `true`, `false` | If `true`, renders a button; clicking it opens the Authenticator with the configured `screen`. |
| `open` | string | Label for the open button (used when `showopen` is enabled). |
| `signingin` | string | Message displayed during the _signing-in_ state. |
| `signingout` | string | Message displayed during sign-out. |
| `redirecting` | string | Message shown while redirecting after sign-in/out. |

#### Example

```html
[gatey id="12" variation="modal" colormode="dark"]
```

---

### `[gatey-account]`

Outputs a Cognito user attribute inline—useful for greetings, dashboards, or conditional content.

#### Attributes

| Attribute | Values | Description |
|---|---|---|
| `component` | `div`, `p`, `span`, `h1`–`h6` | HTML tag to render. Defaults to `div`. |
| `attribute` | Any standard Cognito field (e.g., `email`, `given_name`) or `custom` | The profile field to print. |
| `custom` | Attribute name **without** the `custom:` prefix | Required when `attribute="custom"`. |

#### Examples

```html
Welcome back, [gatey-account attribute="given_name"]!
```

```html
Your tier: [gatey-account attribute="custom" custom="membershipTier"]
```

