What is a “shortcode”?
First things first: If you’ve never worked with a shortcode before, it’s helpful to have a brief introduction.
In WordPress, a shortcode is a small bit of HTML-like code inserted between square brackets. It generally consists of the name of the shortcode, followed by attribute/value pairs, to set various options for that shortcode. The result looks like this:
But why? A shortcode is a simple way to insert custom functionality from a plugin into your WordPress content. When WordPress runs into a registered shortcode (that is, a shortcode with a name that it recognizes) in your content, it replaces the shortcode with output from the associated plugin. Many plugins use shortcodes, including ICS Calendar.
You can learn more about shortcodes, how they work, and why they exist, in the official WordPress documentation.
Basic ICS Calendar Shortcode Example
To insert an ICS calendar in a page, use the following shortcode format, replacing the all-caps text with your information as appropriate.
Calendar Feed URL
Be sure you are using a subscribe URL (which may end in
.ics or have no filename extension), not a web calendar URL (ending in
.html). When in doubt, try loading your feed URL directly by pasting it into your browser’s address bar. The browser should download an
.ics file. If it displays a page, it’s not an ICS feed URL. For more help, see Finding Your ICS Feed URL on the Getting Started page.
Adding More Parameters to Your Shortcode
Each parameter should consist of the parameter name, an equal sign, and the value, in quotation marks. Parameters should be separated by a space. Your complete shortcode might look something like this:
[ics_calendar url="YOUR_ICAL_FEED_URL" view="list" eventdesc="true" limitdays="60"]
Multiple Feeds in One Calendar
This plugin supports multiple feeds in a single calendar display. Enter multiple URLs in the
url parameter, separated by one space, or by the pipe character
|, as long as your feed URLs do not contain that character. Do not include other delimiter characters, as they will be interpreted as part of the URL. (We are using the space as a delimiter since properly formed URLs cannot contain spaces, but this has been known in rare cases to cause conflicts with some other third-party plugins.)
Display Title and Description
description parameters are optional. Any text entered for these parameters will be displayed above the calendar, e.g.
title="My Calendar". If these parameters are omitted, the title and description provided by the calendar feed will be displayed. Use “false” (e.g.
title="false") to hide the title or description altogether.
Deprecation notice: For backwards compatibility with earlier versions, title and description also support
"none" as a value for hiding the default title and description. This support may be removed in a future version.
WordPress likes to convert “straight quotes” into “smart quotes,” which can cause problems with parsing shortcodes. Be sure that you are only using straight quotes in your shortcode. You can also omit the quotes entirely in most cases; parameters in the shortcode only need to be wrapped in quotes if they contain spaces.
WordPress General Settings
Whenever possible, the plugin relies on your site’s general settings (Settings > General) to determine display parameters. Specifically: Site Language, Timezone, Date Format, Time Format and Week Starts On. If any of these elements of the calendar are not displaying to your liking, please check these settings before trying anything else.