Using the Shortcode Generator

Would you like to display your Sugar Calendar events on a page or post without using a block? The shortcode generator makes it easy to create custom shortcodes for displaying your calendar or event listings with specific settings.

This tutorial will walk you through using Sugar Calendar’s shortcode generator to create custom shortcodes for your content.


Before getting started, make sure the Sugar Calendar Events plugin is installed and activated on your WordPress site.

Accessing the Shortcode Generator

To use the shortcode generator, navigate to any page or post editor in your WordPress admin area. In the classic editor, click the Add Sugar Calendar button located above the content editor.

Click Add Sugar Calendar Button

This will open the Insert Sugar Calendar popup window where you can configure your shortcode settings.

Configuring Events Calendar Options

The shortcode generator allows you to create two types of displays: Events Calendar and Events List. Let’s start with the Events Calendar options.

First, select Events Calendar as your display type.

Select Events Calendar Option

Calendar Selection

You can choose to display events from all calendars by checking the Display events from all calendars option, or select specific calendars from the dropdown menu below.

Select Calendar Options

To display events from specific calendars, uncheck the “Display events from all calendars” option and use the dropdown to select your desired calendars.

Select calendar to display

Display Options

Use the Display dropdown to choose how you want your calendar to appear. Available options include:

  • Month – Shows a traditional monthly calendar view
  • Week – Displays events in a weekly format
  • Day – Shows a single day view

Select Display Format

Additional Calendar Settings

The shortcode generator provides several additional options to customize your calendar display:

  • Show Block Header – Displays a header above your calendar
  • Allow Users to Change Display – Enables visitors to switch between month, week, and day views
  • Show Filters – Adds filtering options for visitors
  • Show Search – Includes a search bar for finding specific events

After configuring your settings, click the Add Shortcode button to generate your calendar shortcode.

Click the Add Shortcode button

Configuring Events List Options

To create an events list instead of a calendar view, select Events List as your display type.

Select Events List Option

List-Specific Settings

When you select Events List, you’ll see additional options specific to list displays:

  • Display events from all calendar
  • Group events per week

Configure Events List Options

If you uncheck the Group events per week option, additional options will appear. You can specify the Events per page and Maximum events to show options.

Group events per week

Note: See our tutorial to learn more about displaying upcoming events.

Display and Image Settings

For events lists, you can choose from different display formats using the Display dropdown:

  • List – Simple list format
  • Grid – Grid layout with multiple columns
  • Plain – Basic text-only format

Choose Display Format

You can also configure how featured images appear in your events list:

  • Show Date Cards – Displays date information in card format
  • Show Descriptions – Includes event descriptions in the list
  • Show Featured Images – Displays featured images for events
  • Image Position – Controls where featured images appear (Left, Right, Top, etc.)

Using Your Generated Shortcode

Once you’ve configured all your settings, click the Add Shortcode button. The shortcode generator will create a custom shortcode and insert it into your content editor.

Generated Shortcode in Editor

The generated shortcode will look something like this:

[sugarcalendar_events_calendar calendars="34" display="week"]

or for events lists:

[sugarcalendar_events_list calendars="34" display="grid"]

You can now publish or update your page, and visitors will see your customized calendar or events list on the frontend.

That’s it! You’ve successfully used Sugar Calendar’s shortcode generator to create custom displays for your events.

Next, would you like to learn more about customizing your calendar display? Check out our guide on displaying the calendar for additional customization options.