---
title: "Calendar Shortcodes"
date: 2026-04-23
updated: 2026-10-20
author: "GravityKit"
link: "https://www.gravitykit.com/docs/gravitycalendar/calendar-shortcodes/"
category: "GravityCalendar"
---

As of version 2.0, GravityCalendar now supports four different shortcodes. Each shortcode requires the `id` parameter to work.

### 

This shortcode allows you to embed a calendar on your website.

Example:

```
[gravitycalendar id="12"]
```

The shortcode has the following properties:

• **id** - The calendar feed ID to display. Required.

• **height** - The height of this calendar, including its header and footer. Accepts a CSS length such as `400px`, `100%` or `10vh`, plus `auto`. Leave it out to use the height set on the calendar itself.

• **secret** - Required only when the calendar has **Enable security for this calendar** turned on. See [Calendars with security turned on](#calendar-secret).

Because the height belongs to the shortcode, the same calendar can be short in a sidebar and tall on a full-width page without creating a second calendar:

```
[gravitycalendar id="12" height="400px"]
```

### 

This shortcode will display a subscription link, allowing users to subscribe to your calendar feed using Google Calendar or Apple Calendar. The feed will update in real-time, ensuring events are always up-to-date.

The shortcode has the following properties:

• **`id`** - The calendar feed ID to subscribe to.

• **`text`** - The display text for the subscription link. Default: `Subscribe to Calendar` .

• **`webcal`** - Enable `webcal://` protocol links for calendar apps. `1` = enabled (default), `0` = disabled.

• **`target`** - Link target attribute. `_self` = same window (default), `_blank` = new window.

• **`html_link`** - Display as HTML link. `1` = enabled (default), `0` = disabled.

• **`event_id`** - Subscribe to specific event only. `0` = all events (default).

• **`secret`** - Required only when the calendar has **Enable security for this calendar** turned on. See [Calendars with security turned on](#calendar-secret).

Example:

```
[gravitycalendar_link id="12"]
```

You can customize the text of the link using the `text` attribute. The default is `Subscribe to Calendar`. HTML is not allowed.

```
[gravitycalendar_link id="12" text="Sign up to our calendar!!!!"]
```

To pull a link from a specific event/entry, you must specify the **`event_id`** parameter, which will receive the ID of the entry or the {entry\_id} Merge Tag.

Example:

```
[gravitycalendar_link id="12" event_id="{entry_id}"]
```

To output a single event raw URL, rather than a clickable link, add the **`html_link`** attribute. This will output the URL to download the single event:

Outputs the URL to the calendar:

```
[gravitycalendar_link id="12" html_link="0"]
```

Outputs the URL to a single event:

```
[gravitycalendar_link id="12" event_id="{entry_id}" html_link="0"]
```

### 

This shortcode will display a button that allows users to copy your calendar feed URL to their clipboard. The calendar feed URL is a live-updating link that displays information about your calendar events in real-time.

Example:

```
[gravitycalendar_copy_button id="12"]
```

### 

This shortcode will display a button that allows users to export an event configuration file (`.ics` file) that they can import into any calendar application.

Example:

```
[gravitycalendar_export_button id="12"]
```

**Note**: If you're unsure what the difference is between subscribing to a calendar feed and importing events from a `.ics` file, read [this article](https://www.gravitykit.com/docs/gravitycalendar/subscribing-vs-downloading/).

### How to Find the ID of Your Calendar Feed

To find your calendar feed ID, go to the **Forms** page in Gravity Forms. Next, hover over your form and click on the **Calendar Feeds** link. Now, click the **GravityCalendar** tab on the left to see a list of your calendar feeds for that form. In the **Shortcode** column, you'll see the `[gravitycalendar]` shortcode with the `id` parameter prefilled.

![Forms menu highlighted; shows options like Edit, Settings, and Calendar Feeds for managing calendars](https://www.gravitykit.com/wp-content/uploads/2025/10/file-yEV0GJ96Bb-1.png)
*![GravityCalendar interface showing shortcode for Staff Activities:*[gravitycalendar id="21"]](https://www.gravitykit.com/wp-content/uploads/2025/10/file-lL5kiynRZA.png)

### Calendars with security turned on

When a calendar has **Enable security for this calendar** turned on, its shortcodes work only with the calendar's `secret` attribute. The setting is on for new calendars.

Copy the shortcode with its secret from the **Shortcode (Click to copy)** column of the form's calendar list. The **All Calendars** screen has the same column; go to **GravityKit**, then **All Calendars**. The calendar's own settings show the shortcode under **Embed Calendar**.

```
[gravitycalendar id="12" secret="a1b2c3d4e5f6"]
```

The other calendar shortcodes on this page need the same `secret`.

Without the secret, or with a wrong one, visitors see nothing where the shortcode is. Users who can edit forms in Gravity Forms, which by default means administrators, see this message with the shortcode to use:

> Gravity Forms Calendar: Invalid feed secret provided. Update with the new shortcode: