Shortcode Options

Pie Calendar’s calendar view is displayed by using the shortcode below.

[piecal]

This shortcode accepts a few parameters:


view: The default view for the calendar. Possible values are: dayGridMonth, listMonth, timeGridWeek, listWeek, dayGridWeek, or listDay.

[piecal view="listMonth"]

locale: An ISO 639-1 language code. By default, the calendar will use the locale of your WordPress install, but if you want to specify a different locale, you can do it in this shortcode parameter.

[piecal locale="es"]

type: Specify a post type to show on the calendar. By default, all posts designated as an event will be shown. If you specify a post type, however, only events of that type will be shown on this instance of the calendar.

[piecal type="event"]

Video demonstration:


theme: Specify a preference for dark mode behavior. Possible themes are: dark, adaptive.


Dark forces the calendar into dark mode all the time.


Adaptive checks the user agent setting of "prefers-color-scheme" and adapts light/dark accordingly.


Important note: The adaptive option will adapt to the user's operating system color scheme preference, but this does not always mean that your theme will adapt. Using the adaptive theme can result in unreadable text in the calendar if your theme does not also adapt to the user's color scheme preference. Please test thoroughly when using theme="adaptive".

[piecal theme="adaptive"]

The wraptitles attribute is available in free version 1.1.1 and Pro version 1.2.1.

wraptitles: If the wraptitles attribute is included in the shortcode, events with long names will wrap rather than being obfuscated by the bounds of the event cell they belong to. While the value of the attribute isn't of particular consequence, we recommend setting it to 'true' for better readability.

[piecal wraptitles='true']

The widget attribute is available as of free version 1.2 and Pro version 1.2.1.

[piecal widget="true"]
[piecal widget="responsive"]

Widget mode allows you to have a more functional mobile calendar with options to force the widget mode at all times, or only on smaller screen sizes.

Use the attribute [piecal widget="true"] to force your calendar into Widget mode all the time. This is useful for adding a calendar to your website sidebar, for example.

You also have the option to use [piecal widget="responsive"] and the calendar will change to widget mode when the users screen size is 768px or below.


The Event Info Shortcode

To display an event’s Pie Calendar start and end date, use the shortcode. It only accepts one parameter:

format: By default, the format output by the shortcode will match your WordPress site’s default date & time format. If you want to change it, you can output a specific format in this parameter.

[piecal-info format="Ymd \\a\\r\\o\\u\\n\\d H:i:s"]

Note that any non-format characters (e.g. letters you want to display as letters instead of converting to day/date/time, etc...) must be escaped with double backslashes.


Automatic End Dates

As of free version 1.2.0 and Pro version 1.2.1

Events with no explicit end date now get an end date 1 hour from their start date by default. You can disable this with the automaticEndDates=false shortcode parameter.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.