Arlo home

Shortcodes

A shortcode is a WordPress tag in square brackets that is replaced with content when the page is shown. The Arlo plugin uses shortcodes to show the data imported from your Arlo platform.

Shortcodes take attributes: [shortcode name="value"]. Values are always text in quotes, even numbers and true/false.

Most shortcodes are self-closing: [shortcode] is replaced by its output. An enclosing shortcode has an opening and a closing tag, [shortcode]…[/shortcode], and works on the content between them, which can be your own markup and other shortcodes. In the Arlo plugin the list items, such as [arlo_event_template_list_item], are enclosing: they repeat the enclosed content once for each item. Each reference entry says when a shortcode is enclosing. Without a type, a shortcode is self-closing.

Every Arlo shortcode returns nothing until the first import has completed.

Contents

Shortcode types

  • Global level shortcodes can be used in a post or page as a placeholder for a whole list or page.
  • Template level shortcodes can be used in the plugin's templates.
  • A few utility shortcodes, such as the search field, [arlo_label], [arlo_condition_return] and [arlo_powered_by], can be used in both places.
  • To show only some of the items in a list, see Filtering lists.

Universal attributes

Every Arlo shortcode accepts these attributes, in addition to its own.

Structure

[arlo_event_presenters label="Presenter: " wrap="<span>%s</span>"]

Output (example)

Rendered as HTML, when the event has a presenter:

<span><label>Presenter: </label> Presenter Name</span>

and nothing at all when the event has no presenters.

Usage

  • label and wrap are only output when the shortcode has output, so they are the way to add a heading or element around optional content without leaving an empty one behind.
  • When the output is always present, plain markup around the shortcode does the same job and is simpler to read.
  • wrap and label are filtered like WordPress post content, so tags such as iframe, form and script cannot be used in them. Put those in the template markup around the shortcode.

Attributes

AttributeType / valuesDefaultDescription
label Text; HTML as allowed in a WordPress post None Output as a <label> element before the content.
wrap Text containing %s; HTML as allowed in a WordPress post %s The markup placed around the content. %s is replaced with the content and %% gives a literal percent sign. Any other % is left as written.
strip_html Boolean false When true, all HTML tags are removed from the content before label and wrap are applied.
decode_quotes_in_shortcodes Boolean false When true, a shortcode in the content that was saved with &quot; or &apos; in place of quotes is repaired before it runs. This lets a shortcode from another plugin work inside an Arlo template.

Examples

A percent sign in wrap is kept, so it can be used in a style:

[arlo_event_name wrap="<h2 style='width:100%'>%s</h2>"]
<h2 style="width:100%">Leadership Workshop</h2>

Remove the tags from the content, here a category header stored as <p>Develop your <b>leadership</b> skills.</p>:

[arlo_category_header strip_html="true"]
Develop your leadership skills.

Attribute values and placeholders

Attribute tables in this documentation use these types.

Types

TypeMeaning
IntegerDigits only, written in quotes: depth="2".
BooleanThe text true or false. Other words such as yes or 1 are not recognised.
TextAny text. Plain text is output as written; where the table says "HTML as allowed in a WordPress post", other markup is removed.
Text containing %sText with a placeholder that the plugin replaces. See the next section.
OptionOne value from a list given in the table.

Placeholders

Some attributes take your own markup and put a value into it. Only the placeholders listed for an attribute are replaced; a % that is not part of one is left as written, so style="width:100%" is safe.

PlaceholderReplaced withUsed in
%sThe value for that attribute (see the shortcode).wrap on any shortcode, and title, group_header, events_after and counts where they are documented.
%%A literal percent sign.Wherever %s is accepted.
%dA number. Only accepted where an attribute says so.counts on [arlo_categories].
{slug}The category slug.item on [arlo_category_breadcrumb] and [arlo_event_category_path].
{label}The category name.item on [arlo_category_breadcrumb] and [arlo_event_category_path].
  • Markup that contains a placeholder is filtered like WordPress post content. For wrap this happens before the value is inserted, so the value is the shortcode's own escaped output; for title, group_header and events_after the result is filtered again after the value is inserted. Put values in element text or a data- attribute, or after a fixed prefix such as href="/catalogue/{slug}".

Date and time formats

The format attribute of the date shortcodes, such as [arlo_event_start_date] and [arlo_event_end_date], and the startdateformat and enddateformat attributes of [arlo_event_dates], say how a date and time is written. Each shortcode has its own default, which is given in its attribute table.

Structure

A format is your own text with conversions in it. A conversion is a percent sign and a letter, such as %d for the day of the month. Each conversion is replaced with that part of the date, and everything else is output as written.

[arlo_event_start_date format="%d %b %Y %H:%M"]

Output (example)

For an event that starts at 2:05 pm on 5 March 2026:

05 Mar 2026 14:05

Usage

  • The date and time are shown in the event's own time zone. For online events, visitors can choose their own time zone with [arlo_timezones]. Month and day names are always in English.
  • A format with no % is read as a PHP date() style format: d M Y gives the same result as %d %b %Y. The common letters are d, j, D, l, m, n, M, F, y, Y, g, h, H, i, a and A. Use the percent conversions when you need anything else.
  • Put - after the percent sign to drop the leading zero: %-d gives 5 where %d gives 05. Put ^ there to use capitals: %^a gives THU.
  • Use %% for a literal percent sign.

Conversions

The examples are for 2:05 pm on Thursday 5 March 2026 in New Zealand daylight time.

PartConversionShowsExample
Day%dDay of the month, two digits05
%-dDay of the month, no leading zero5
%aWeekday, shortThu
%AWeekday, fullThursday
Month%mMonth number, two digits03
%bMonth name, shortMar
%BMonth name, fullMarch
Year%YYear, four digits2026
%yYear, two digits26
Time, 24-hour%HHour, two digits14
Time, 12-hour%IHour, two digits02
%lHour, no leading zero2
%pAM or PMPM
%Pam or pmpm
Minutes%MMinutes, two digits05
Time zone%ZAbbreviationNZDT
%zOffset from UTC+13:00

Examples

Weekday, day and month:

[arlo_event_start_date format="%a %d %b"]
Thu 05 Mar

Full names and a 12-hour time, with no leading zeros:

[arlo_event_start_date format="%A %-d %B, %l:%M %p"]
Thursday 5 March, 2:05 PM

A time with its time zone, and the same date written as a PHP date() style format:

[arlo_event_start_date format="%H:%M %Z"]
[arlo_event_start_date format="j F Y"]
14:05 NZDT
5 March 2026