Online Activity related shortcodes
These shortcodes show the online activities of an event template, and the details of each online activity: its name, code, reference term, credits, delivery description, offers, registration button and rich snippet.
There are two places to use them. On the Event template, [arlo_oa_list_item] repeats your markup for each online activity of the event template being viewed. On the Online activities list template, [arlo_onlineactivites_list_item] does the same for each item of the list. Inside either one, the shortcodes below output the current online activity.
The HTML shown for each shortcode is what the plugin outputs, with line breaks and indentation added for readability. Names, prices and URLs are examples.
Contents
- [arlo_oa_list] – optional container for the online activities of an event template (an enclosing shortcode)
- [arlo_oa_list_item] – repeats the markup between its tags for each online activity of the event template (an enclosing shortcode)
- [arlo_oa_name] – name of the online activity
- [arlo_oa_code] – code of the online activity
- [arlo_oa_delivery_description] – delivery description
- [arlo_oa_offers] – list of offers and prices
- [arlo_oa_registration] – registration button or message
- [arlo_oa_reference_term] – the reference term, such as "Course"
- [arlo_oa_credits] – list of credits
- [arlo_oa_rich_snippet] – structured data for search engines
Quick start
A section of the Event template that lists the online activities of the event template, shown for an event template with one online activity:
[arlo_oa_list wrap="<ul class='arlo-list'>%s</ul>"]
[arlo_oa_list_item]
<li>
[arlo_oa_reference_term wrap="<strong>%s</strong>"]
<h3>[arlo_oa_name]</h3>
[arlo_oa_credits]
[arlo_oa_delivery_description wrap="<div class='delivery'>%s</div>"]
[arlo_oa_offers]
[arlo_oa_registration class="arlo-button"]
</li>
[/arlo_oa_list_item]
[/arlo_oa_list]
Rendered as HTML:
<ul class="arlo-list">
<li>
<strong>Course</strong>
<h3>Reporting Essentials</h3>
<ul class="arlo-oa-credits"><li>CPD points: 4</li></ul>
<div class="delivery">Complete a guided online activity.</div>
<ul class="arlo-list arlo-event-offers">
<li><span>Online activity <span class="amount">EUR 120.00</span> <span class="arlo-price-tax">excl. tax</span></span></li>
</ul>
<div class="arlo-oa-registration"><a aria-label="Start this activity, opens in new tab" class="arlo-button arlo-register" href="https://example.com/register/1" target="_blank">Start this activity</a></div>
</li>
</ul>
[arlo_oa_list]
A container for the online activities on an event template. It repeats nothing itself: the repeating is done by [arlo_oa_list_item] inside it, and the shortcode outputs its content unchanged.
Type: Enclosing. Put your markup and other shortcodes between [arlo_oa_list] and [/arlo_oa_list].
Use in: the Event template.
Structure
[arlo_oa_list wrap="<ul class='arlo-list'>%s</ul>"]
[arlo_oa_list_item]
<li>[arlo_oa_name]</li>
[/arlo_oa_list_item]
[/arlo_oa_list]
Output (example)
Rendered as HTML, for an event template with two online activities:
<ul class="arlo-list"> <li>Reporting Essentials</li> <li>Reporting Advanced</li> </ul>
Usage
- It is optional. [arlo_oa_list_item] works without it.
- Use it with
wrapto add a container that is left out when there is nothing to show: an event template without online activities outputs no<ul>.
Attributes
None. Accepts the universal attributes; wrap is used in the example above.
[arlo_oa_list_item]
Repeats the content between its tags once for each online activity of the event template being viewed.
Type: Enclosing. Put your markup and other shortcodes between [arlo_oa_list_item] and [/arlo_oa_list_item].
Use in: the Event template.
Structure
[arlo_oa_list_item]
<div class="activity">
<h3>[arlo_oa_name]</h3>
[arlo_oa_offers]
[arlo_oa_registration]
</div>
[/arlo_oa_list_item]
Output (example)
Rendered as HTML, for an event template with one online activity:
<div class="activity"> <h3>Reporting Essentials</h3> <ul class="arlo-list arlo-event-offers">…</ul> <div class="arlo-oa-registration">…</div> </div>
Usage
- The shortcode adds no markup of its own. Online activities of the active region only are listed, and when the event template has none, nothing is output.
- All the
[arlo_oa_…]shortcodes on this page output the online activity being repeated, so they only work between these tags (or between [arlo_onlineactivites_list_item] on the Online activities list template). - Put [arlo_event_template_register_interest] after the list to show its message when the event template has no events and no online activities.
Attributes
None. Accepts the universal attributes, which apply to the whole repeated output. Wrap it in [arlo_oa_list] when you want a wrap that is dropped for an empty list.
[arlo_oa_name]
Outputs the name of the online activity, which can be different from the name of the event template.
Use in: [arlo_oa_list_item] (Event template) or [arlo_onlineactivites_list_item] (Online activities list template).
Structure
<h3>[arlo_oa_name]</h3>
Output (example)
Rendered as HTML:
<h3>Reporting Essentials</h3>
Attributes
None. Accepts the universal attributes.
[arlo_oa_code]
Outputs the code of the online activity as plain text.
Use in: [arlo_oa_list_item] (Event template) or [arlo_onlineactivites_list_item] (Online activities list template).
Structure
[arlo_oa_code label="Code: " wrap="<span class='code'>%s</span>"]
Output (example)
Rendered as HTML:
<span class="code"><label>Code: </label> OA-1</span>
Attributes
None. Accepts the universal attributes; label and wrap are used in the example above, so nothing is left behind when the code is empty.
[arlo_oa_delivery_description]
Outputs the delivery description of the online activity as plain text.
Use in: [arlo_oa_list_item] (Event template) or [arlo_onlineactivites_list_item] (Online activities list template).
Structure
[arlo_oa_delivery_description wrap="<div class='delivery'>%s</div>"]
Output (example)
Rendered as HTML:
<div class="delivery">Complete a guided online activity.</div>
Usage
- The description is often empty. Use
wraprather than your own tags around the shortcode, so no empty element is left behind.
Attributes
None. Accepts the universal attributes; wrap is used in the example above.
[arlo_oa_offers]
Outputs a list of the offers for the online activity, with prices shown as set by the Price shown setting. A free offer shows the Free text setting.
Use in: [arlo_oa_list_item] (Event template) or [arlo_onlineactivites_list_item] (Online activities list template).
Structure
[arlo_oa_offers label="<strong>Price</strong>" wrap="<div class='offers'>%s</div>"]
Output (example)
Rendered as HTML, for an offer with a label and one discounted offer:
<div class="offers"><label><strong>Price</strong></label>
<ul class="arlo-list arlo-event-offers">
<li><span>Standard <span class="amount">EUR 120.00</span> <span class="arlo-price-tax">excl. tax</span></span></li>
<li><span class="discount">Early bird <span class="amount">EUR 99.00</span> <span class="arlo-price-tax">excl. tax</span></span></li>
</ul>
</div>
Usage
- Each offer is a list item with the label, the price in
<span class="amount">and the tax note in<span class="arlo-price-tax">. Discount offers have the classdiscount. - Nothing is output when the online activity has no offers, so use
wraporlabelfor any surrounding markup. - With regions mapped, only the offers of the visitor's region are listed, in that region's currency. See Pricing and currencies.
Attributes
None. Accepts the universal attributes; label and wrap are used in the example above.
[arlo_oa_registration]
Outputs a button that opens the registration page for the online activity. When there is no registration link, the registration message is output as text instead.
Use in: [arlo_oa_list_item] (Event template) or [arlo_onlineactivites_list_item] (Online activities list template).
Structure
[arlo_oa_registration class="arlo-button"]
Output (example)
Rendered as HTML:
<div class="arlo-oa-registration">
<a aria-label="Start this activity, opens in new tab" class="arlo-button arlo-register"
href="https://example.com/register/1" target="_blank">Start this activity</a>
</div>
Usage
- The button text is the registration message of the online activity. The link opens in a new tab.
- The button always has the class
arlo-register, plus the classes you give inclass.
Attributes
| Attribute | Type / values | Default | Description |
|---|---|---|---|
| class | Text; one or more CSS class names | button |
CSS classes for the button, in addition to arlo-register. |
Also accepts the universal attributes.
[arlo_oa_reference_term]
Outputs the reference term the online activity is known by, such as "Course" or "Module", in its singular or plural form.
Use in: [arlo_oa_list_item] (Event template) or [arlo_onlineactivites_list_item] (Online activities list template).
Structure
[arlo_oa_reference_term type="singular" wrap="<strong>%s</strong>"]
Output (example)
Rendered as HTML:
<strong>Course</strong>
Usage
- Not every online activity has a reference term. Use
wrapso that no empty element is left behind.
Attributes
| Attribute | Type / values | Default | Description |
|---|---|---|---|
| type | Option: singularplural |
singular |
Which form of the reference term to output. |
Also accepts the universal attributes.
[arlo_oa_credits]
Outputs the credits of the online activity, such as CPD points, as a list.
Use in: [arlo_oa_list_item] (Event template) or [arlo_onlineactivites_list_item] (Online activities list template).
Structure
[arlo_oa_credits layout="list" wrap="<div class='credits'>%s</div>"]
Output (example)
Rendered as HTML, for two credits:
<div class="credits">
<ul class="arlo-oa-credits">
<li>CPD points: 4</li>
<li>Level: Intro</li>
</ul>
</div>
Usage
- Each list item is the credit type, a colon and its value.
- Many online activities have no credits. Use
wrapso that no empty element is left behind.
Attributes
| Attribute | Type / values | Default | Description |
|---|---|---|---|
| layout | Option: list |
list |
The layout of the credits. list is the only layout. |
Also accepts the universal attributes.
[arlo_oa_rich_snippet]
Outputs structured data (JSON-LD, an OnDemandEvent) about the online activity, for search engines. It is not visible on the page.
Use in: [arlo_onlineactivites_list_item] on the Online activities list template.
Structure
[arlo_oa_rich_snippet link="permalink"]
Output (example)
Rendered as HTML:
<script type="application/ld+json">{"@context":"http://schema.org","@type":"OnDemandEvent",
"name":"Reporting Essentials","url":"https://example.com/events/101-reporting-essentials/",
"description":"Plan launches without guesswork.",
"offers":{"@type":"AggregateOffer","lowPrice":"120.00","highPrice":"120.00","priceCurrency":"EUR",…}}</script>
Usage
- Put it inside the list item, after your markup for the online activity. The snippet contains the name, link, description and offer prices of that online activity. With regions mapped, the prices are in the currency of the visitor's region.
- It has no output on the Event template, even inside [arlo_oa_list_item].
Attributes
| Attribute | Type / values | Default | Description |
|---|---|---|---|
| link | Option:
|
permalink |
Which link is used as the url of the snippet. |
Also accepts the universal attributes.