Displaying a calendar
A calendar you set up on a form can go on your site with a block, a shortcode, a widget area, a GravityView View or Elementor. If you haven’t set one up yet, start with Getting started with GravityCalendar.
Adding the GravityCalendar block #
In the block editor, click the + icon, search for calendar and choose GravityCalendar.

In the block’s settings sidebar, choose the Form, then the Feed, which is the calendar itself. The editor shows a preview of the calendar.

To give the calendar a different height in this block than elsewhere, see Setting the height of a calendar.
Adding the shortcode #
Each calendar has its own shortcode. Go to Forms, hover over the form and click Settings, then click GravityCalendar. The Shortcode column lists the shortcode of each calendar on the form: click it to copy it.

Paste the shortcode into a page, a post or a Shortcode block. It looks like this:
[gravitycalendar id="7" secret="9bb4258b0ec9"]A new calendar has Enable security for this calendar turned on, which adds the secret to its shortcode. Without the right secret the calendar doesn’t show, so copy the shortcode from the list.
Adding the calendar to a widget area #
If your theme has widget areas, go to Appearance, then Widgets, click the + icon in an area and add the GravityCalendar block. Choose the Form and Feed in the block’s settings, as in the block editor, and save the widgets.
On a block theme, such as Twenty Twenty-Five, add the GravityCalendar block to a template or template part in the Site Editor. These themes have no Widgets screen.
Adding the calendar to a View #
A GravityView View can show its entries on a calendar with the Calendar widget. Edit the View, click Add Widget under Top Widgets or Bottom Widgets, and click Calendar.

Click the gear icon on the Calendar widget, choose the calendar under Calendar, and pick which entries Display events for puts on it:
- All View entries: every entry the View shows, across all of its pages.
- Entries shown on the page: only the entries on the page of the View the visitor is looking at.

Click Close, then click Update to save the View.
The calendar in a View shows only the entries the View lists, so the View’s settings and filters decide which events appear. With Show only approved entries on, entries that aren’t approved stay off the calendar. Hide View data until search is performed makes the View list nothing until a visitor searches, so the calendar stays empty until then. To show the calendar’s events whatever the View lists, put the calendar on a page of its own with its shortcode.
Adding the calendar with Elementor #
If you build pages with Elementor, search for Calendar in the Elements panel and drag the GravityCalendar widget onto the page, then pick a calendar on the Content tab. The calendar renders in the Elementor editor as you build, and the Style tab has a Height control for sizing that one calendar.
See Adding a calendar with the Elementor widget for the full walkthrough.
Showing a calendar on the same page as its form #
When a calendar and its form are on the same page, the calendar shows a new entry as soon as the form is submitted. The page doesn’t reload, and the calendar stays on the month or week being viewed.
The form has to submit with AJAX:
- Gravity Forms block: turn on AJAX in the block’s Advanced settings.
- Shortcode: add
ajax="true", for example[gravityform id="3" ajax="true"]. - Gravity Forms widget in a View: check Enable AJAX in the widget’s settings.
Entries the calendar wouldn’t show after a page reload stay hidden, such as entries waiting for approval or entries that don’t match the calendar’s Conditional Logic. In a View, the calendar keeps the visitor’s search and shows the new entry only if it matches. A Calendar widget with Display events for set to Entries shown on the page updates only when the page reloads.