Templates
Every Arlo page is built from a template. A template is plain HTML with shortcodes in it: the shortcodes output your Arlo data, and the HTML around them is your layout. This article describes what each template is for, how it is structured, and which shortcodes it can use.
- Where to edit. Go to Arlo > Settings > Pages and choose the page's sub-tab. The template is the editor on that sub-tab, and the list below it shows the shortcodes you can use there. See Templates in the settings.
- Saved per theme. A theme supplies the original templates for all your Arlo pages. The plugin remembers the edits you make under each theme, so switching to another theme and back brings your edits back. Reload original template above the editor replaces the editor text with the theme's original, and Save Changes keeps it. Apply & Reset on the Theme tab restores the originals for every page.
- Who can edit. Only users with the WordPress
unfiltered_htmlcapability, normally administrators, can change a template. Everyone else sees it read-only, and saved templates keep working. - Custom shortcodes. A custom shortcode gets its own template, which starts from the default for its type and can use the same shortcodes as that type.
To change how the pages look, add your own styles in WordPress under Appearance > Customize > Additional CSS rather than editing the plugin's files. See Custom CSS.
Contents
- How templates are built
- Event
- Catalogue
- Schedule
- Event search list
- Upcoming events list
- Online activities list
- Venue list
- Venue
- Presenter list
- Presenter
- Upcoming events widget
- Tips
How templates are built
The templates follow one pattern:
- Page-level shortcodes such as filters, a region selector, pagination or a breadcrumb sit at the top level of the template.
- A list item shortcode is an enclosing shortcode: it repeats the markup between its opening and closing tags once for each item (an event, a venue, a presenter). Shortcodes that output one field of the item, such as a name or a date, go inside it.
- The single-item pages (Event, Venue and Presenter) have no list item for the page itself, so the shortcodes for the item are used directly.
The markup in the examples is indicative: it follows the shape of the bundled templates, which are a good starting point. A few shortcodes work in every template: [arlo_label] and [arlo_condition_return] for optional or conditional markup, and [arlo_powered_by], which most bundled templates end with and which outputs the "Powered by Arlo" credit only when it is switched on in the settings. The shortcode reference describes each shortcode's attributes.
Event
The page for one event. Visitors reach it from the catalogue, schedule, search and upcoming lists. It shows the event's description, its dates and venues, its online activities and its registration links.
Used by: the event page, which the plugin creates for each event. There is no host page or shortcode to add.
Structure
- Event-level shortcodes (
arlo_event_template_*) at the top level of the template output the event's name, summary, duration and so on. - [arlo_event_list_item] sits inside [arlo_event_list] and repeats once for each scheduled run of the event. The
arlo_event_*andarlo_venue_*shortcodes belong inside it, and so does [arlo_event_session_list_item], which repeats for each session of a multi-session run. - [arlo_oa_list_item] sits inside [arlo_oa_list] and repeats for each online activity of the event.
- [arlo_suggest_templates] repeats for each suggested similar event, and [arlo_content_field_item] repeats for each of the event's content fields.
[arlo_template_region_selector]
[arlo_event_template_summary wrap="<p>%s</p>"]
[arlo_event_template_advertised_duration wrap="<p>%s</p>"]
<ul class="arlo-list events">
[arlo_event_list]
[arlo_event_list_item show="3"]
<li>
[arlo_event_start_date format="d M"]
[arlo_event_location label="Location: " wrap="<div>%s</div>"]
[arlo_event_registration]
[arlo_event_session_list_item]
<div>[arlo_event_name] [arlo_event_start_date format="d M"]</div>
[/arlo_event_session_list_item]
</li>
[arlo_event_rich_snippet]
[/arlo_event_list_item]
[/arlo_event_list]
</ul>
[arlo_event_template_register_interest]
[arlo_content_field_item]
[arlo_content_field_name wrap="<h5>%s</h5>"]
[arlo_content_field_text wrap="<p>%s</p>"]
[/arlo_content_field_item]
[arlo_powered_by]
Main shortcodes
- Event: [arlo_event_template_code], [arlo_event_template_name], [arlo_event_template_link], [arlo_event_template_summary], [arlo_event_template_advertised_duration], [arlo_event_template_advertised_price], [arlo_event_template_advertised_presenters], [arlo_event_template_credits], [arlo_event_template_hero_image], [arlo_event_template_tags], [arlo_event_template_rich_snippet]
- Navigation: [arlo_breadcrumbs] links back to the list page and shows the current event.
- Region, timezone and filters: [arlo_template_region_selector], [arlo_timezones], [arlo_event_filters], [arlo_no_event_in_region] for a message when the event is not offered in the selected region
- Inside [arlo_event_list_item]: [arlo_event_name], [arlo_event_code], [arlo_event_duration], [arlo_event_duration_description], [arlo_event_price], [arlo_event_next_running], [arlo_event_start_date], [arlo_event_end_date], [arlo_event_dates], [arlo_event_location], [arlo_event_provider], [arlo_event_delivery], [arlo_event_session_description], [arlo_event_summary], [arlo_event_presenters], [arlo_event_offers], [arlo_event_offers_hasdiscount], [arlo_event_haslimitedplaces], [arlo_event_registration], [arlo_event_isfull], [arlo_event_notice], [arlo_event_tags], [arlo_event_credits], [arlo_event_rich_snippet]
- Venue, inside the same block: [arlo_venue_name], [arlo_venue_permalink], [arlo_venue_link], [arlo_venue_address], [arlo_venue_directions], [arlo_venue_parking], [arlo_venue_map], [arlo_venue_rich_snippet]
- Inside [arlo_event_session_list_item]: the session's own [arlo_event_name], [arlo_event_start_date], [arlo_event_end_date], [arlo_event_dates], [arlo_event_duration], [arlo_event_location], [arlo_event_summary], [arlo_event_presenters], [arlo_event_tags], [arlo_event_price]
- Online activities, inside [arlo_oa_list_item]: [arlo_oa_reference_term], [arlo_oa_code], [arlo_oa_name], [arlo_oa_credits], [arlo_oa_delivery_description], [arlo_oa_offers], [arlo_oa_registration], [arlo_oa_rich_snippet]
- Interest, suggestions and content: [arlo_event_template_register_interest], [arlo_event_template_register_private_interest], [arlo_suggest_datelocation], [arlo_suggest_private_datelocation], [arlo_suggest_templates] with the
arlo_event_template_*shortcodes and [arlo_event_next_running] inside it, and [arlo_content_field_item] with [arlo_content_field_name] and [arlo_content_field_text] inside it
Catalogue
The list of all your events (event templates, that is, courses), usually grouped by category. Each row links to its Event page.
Used by: the host page that contains [arlo_event_template_list]. See Host pages.
Structure
- Categories, a region selector, filters and a breadcrumb come first, then the list, then the category footer, a "no events" message and the pagination.
- [arlo_event_template_list_item] repeats once for each event. Its
groupandlimitattributes group the list and set the page size. The fields of the event and its group divider go inside it.
[arlo_categories title="<h5>%s Categories</h5>" wrap="<div class='arlo-categories'>%s</div>"]
[arlo_template_region_selector]
[arlo_event_template_filters]
[arlo_category_header]
<table class="table event-templates">
[arlo_event_template_list_item group="category" limit="20"]
[arlo_group_divider wrap="<tr><th colspan='4'>%s</th></tr>"]
<tr>
<td>[arlo_event_template_permalink wrap="<a href='%s'>"][arlo_event_template_name]</a></td>
<td>[arlo_event_template_advertised_duration]</td>
<td>[arlo_event_price showfrom="false"]</td>
<td>[arlo_event_next_running]</td>
</tr>
[arlo_event_template_rich_snippet]
[/arlo_event_template_list_item]
</table>
[arlo_category_footer]
[arlo_no_event_text]
[arlo_event_template_list_pagination]
[arlo_powered_by]
Main shortcodes
- Page level: [arlo_categories], [arlo_template_region_selector], [arlo_event_template_filters], [arlo_breadcrumbs], [arlo_category_breadcrumb], [arlo_category_title], [arlo_category_header], [arlo_category_footer], [arlo_no_event_text], [arlo_event_template_list_pagination]
- Inside [arlo_event_template_list_item]: [arlo_group_divider], [arlo_event_template_code], [arlo_event_template_name], [arlo_event_template_link], [arlo_event_template_permalink], [arlo_event_template_summary], [arlo_event_template_advertised_duration], [arlo_event_template_advertised_price], [arlo_event_template_advertised_presenters], [arlo_event_template_credits], [arlo_event_template_tags], [arlo_event_template_list_image], [arlo_event_template_rich_snippet], [arlo_event_price], [arlo_event_next_running], [arlo_content_field_item] with [arlo_content_field_name] and [arlo_content_field_text] inside it
Schedule
The same kind of list as the Catalogue, with its own template, page and settings, so you can present the dates differently.
Used by: the host page that contains [arlo_schedule].
Structure
The structure is the same as the Catalogue: the page-level shortcodes, then an [arlo_event_template_list_item] block with the event's fields inside it. The differences are the filter and pagination shortcodes, which are [arlo_schedule_filters] and [arlo_schedule_pagination].
[arlo_categories] [arlo_template_region_selector] [arlo_schedule_filters] [arlo_event_template_list_item group="category" limit="20"] [arlo_group_divider wrap="<h3>%s</h3>"] [arlo_event_template_permalink wrap="<a href='%s'>"][arlo_event_template_name]</a> [arlo_event_next_running] [/arlo_event_template_list_item] [arlo_no_event_text] [arlo_schedule_pagination]
Main shortcodes
The same as the Catalogue, with these changes:
- Page level: [arlo_schedule_filters] replaces the catalogue filters, and [arlo_schedule_pagination] replaces its pagination. [arlo_event_template_list_pagination] also works.
Event search list
The results of a search for events, with a search field above the list. The Event search widget sends visitors here.
Used by: the host page that contains [arlo_event_template_search_list].
Structure
A search field and region selector at the top, an [arlo_event_template_list_item] block for the results, then a "no events" message and pagination. It has no categories or filters.
[arlo_template_search_region_selector]
[arlo_search_field placeholder="Search events" showbutton="true"]
<table class="table event-templates">
[arlo_event_template_list_item]
<tr>
<td>
[arlo_event_template_permalink wrap="<a href='%s'>"][arlo_event_template_name]</a>
[arlo_event_template_tags]
</td>
<td>[arlo_event_template_advertised_duration]</td>
<td>[arlo_event_next_running]</td>
</tr>
[arlo_event_template_rich_snippet]
[/arlo_event_template_list_item]
</table>
[arlo_no_event_text]
[arlo_event_template_list_pagination]
Main shortcodes
- Page level: [arlo_search_field], [arlo_template_search_region_selector], [arlo_no_event_text], [arlo_event_template_list_pagination]
- Inside [arlo_event_template_list_item]: the same event shortcodes as the Catalogue, plus [arlo_event_category_path] for the categories an event belongs to.
Upcoming events list
A list of individual upcoming events (each scheduled run), in date order. Unlike the catalogue, each row is one dated event with its location, delivery and registration.
Used by: the host page that contains [arlo_upcoming_list]. The Upcoming events widget uses a template of the same shape.
Structure
- [arlo_upcoming_list_item] repeats once for each event. Inside it you can use the event shortcodes, the
arlo_event_template_*shortcodes for the event's template (name, link, summary) and thearlo_venue_*shortcodes. - Its
noevent_beforeandnoevent_afterattributes output a message when there are no events. Use them in place of[arlo_no_event_text], which is for the catalogue-style lists.
[arlo_template_region_selector]
[arlo_upcoming_event_filters filters="category,month,location,delivery"]
<ul class="arlo-list upcoming">
[arlo_upcoming_list_item limit="50"]
[arlo_group_divider wrap="<li>%s</li>"]
<li>
<h4>[arlo_event_template_permalink wrap="<a href='%s'>"][arlo_event_template_name]</a></h4>
[arlo_event_start_date format="d M Y"]
[arlo_event_location label="Location: " wrap="<div>%s</div>"]
[arlo_event_offers]
[arlo_event_registration]
</li>
[arlo_event_rich_snippet]
[/arlo_upcoming_list_item]
</ul>
[arlo_upcoming_list_pagination limit="50"]
[arlo_powered_by]
Main shortcodes
- Page level: [arlo_upcoming_region_selector] (or [arlo_template_region_selector]), [arlo_upcoming_event_filters], [arlo_breadcrumbs], [arlo_category_title], [arlo_category_header], [arlo_category_footer], [arlo_upcoming_list_pagination]
- Inside [arlo_upcoming_list_item], the event: [arlo_group_divider], [arlo_event_code], [arlo_event_duration], [arlo_event_duration_description], [arlo_event_price], [arlo_event_next_running], [arlo_event_start_date], [arlo_event_end_date], [arlo_event_dates], [arlo_event_location], [arlo_event_provider], [arlo_event_delivery], [arlo_event_notice], [arlo_event_session_description], [arlo_event_presenters], [arlo_event_offers], [arlo_event_offers_hasdiscount], [arlo_event_haslimitedplaces], [arlo_event_registration], [arlo_event_isfull], [arlo_event_tags], [arlo_event_rich_snippet], [arlo_upcoming_offer], [arlo_event_session_list_item] for multi-session events
- Inside the same block, the event's template and venue: [arlo_event_template_code], [arlo_event_template_name], [arlo_event_template_link], [arlo_event_template_permalink], [arlo_event_template_summary], [arlo_event_template_advertised_duration], [arlo_event_template_tags], [arlo_event_template_list_image], [arlo_content_field_item], and the
arlo_venue_*shortcodes
Online activities list
A list of online activities, which are self-paced events with no scheduled dates.
Used by: the host page that contains [arlo_onlineactivites_list]. The shortcode name is spelled that way in the plugin.
Structure
[arlo_onlineactivites_list_item] repeats once for each online activity, with group and limit attributes like the catalogue. Inside it you can use the arlo_oa_* shortcodes and also the arlo_event_template_* shortcodes, which output the activity's event template, for example its link and summary. Its noevent_before and noevent_after attributes output a message when there are no activities.
[arlo_template_region_selector]
[arlo_onlineactivites_filters]
<ul class="arlo-online-activities">
[arlo_onlineactivites_list_item limit="10" group="category"]
[arlo_group_divider wrap="<li>%s</li>"]
<li>
<h4>[arlo_event_template_permalink wrap="<a href='%s'>"][arlo_oa_name]</a></h4>
[arlo_oa_delivery_description wrap="<div>%s</div>"]
[arlo_event_template_summary wrap="<p>%s</p>"]
[arlo_oa_offers]
[arlo_oa_registration]
</li>
[arlo_oa_rich_snippet]
[/arlo_onlineactivites_list_item]
</ul>
[arlo_onlineactivites_list_pagination limit="10"]
Main shortcodes
- Page level: [arlo_template_region_selector], [arlo_onlineactivites_filters], [arlo_breadcrumbs], [arlo_onlineactivites_list_pagination]
- Inside [arlo_onlineactivites_list_item]: [arlo_group_divider], [arlo_oa_name], [arlo_oa_code], [arlo_oa_reference_term], [arlo_oa_credits], [arlo_oa_delivery_description], [arlo_oa_offers], [arlo_oa_registration], [arlo_oa_rich_snippet], [arlo_event_template_permalink], [arlo_event_template_summary], [arlo_event_template_tags]
Venue list
A list of your venues. Each links to its Venue page.
Used by: the host page that contains [arlo_venue_list].
Structure
[arlo_venue_list_item] repeats once for each venue, with the arlo_venue_* shortcodes inside it. [arlo_venue_list_pagination] follows the list.
<ul class="arlo-list venues">
[arlo_venue_list_item limit="6"]
<li>
<h4>[arlo_venue_permalink wrap="<a href='%s'>"][arlo_venue_name]</a></h4>
[arlo_venue_address layout="string" items="line1,line2,line3,line4,locale,country" wrap="%s"]
[arlo_venue_map height="200" width="250"]
</li>
[arlo_venue_rich_snippet]
[/arlo_venue_list_item]
</ul>
[arlo_venue_list_pagination limit="6"]
[arlo_powered_by]
Main shortcodes
- Page level: [arlo_breadcrumbs], [arlo_venue_list_pagination]
- Inside [arlo_venue_list_item]: the venue shortcodes listed for the Venue template.
Venue
The page for one venue, with its address, map, parking and directions.
Used by: the venue page, which the plugin creates for each venue. There is no host page or shortcode to add.
Structure
There is no list item. Use the arlo_venue_* shortcodes directly. [arlo_label] is useful for keeping a heading together with a group of optional fields, such as the address lines, so that nothing is output when they are all empty.
[arlo_label label="<h5>Address</h5>"] [arlo_venue_address layout="string" items="line1,line2,line3,line4,locale,country" wrap="%s"] [/arlo_label] [arlo_venue_directions label="<h5>Directions</h5>"] [arlo_venue_parking label="<h5>Parking</h5>"] [arlo_venue_map height="400" width="520"] [arlo_powered_by] [arlo_venue_rich_snippet]
Main shortcodes
- Venue: [arlo_venue_name], [arlo_venue_permalink], [arlo_venue_link], [arlo_venue_address], [arlo_venue_directions], [arlo_venue_direction], [arlo_venue_parking], [arlo_venue_map], [arlo_venue_locationname], [arlo_venue_events_link], [arlo_venue_rich_snippet]
- Page level: [arlo_breadcrumbs]
Presenter list
A list of your presenters. Each links to its Presenter page.
Used by: the host page that contains [arlo_presenter_list].
Structure
[arlo_presenter_list_item] repeats once for each presenter, with the arlo_presenter_* shortcodes inside it. [arlo_presenter_list_pagination] follows the list.
<ul class="arlo-list presenters">
[arlo_presenter_list_item]
<li>
[arlo_presenter_profile_avatar]
<h4>[arlo_presenter_permalink wrap="<a href='%s'>"][arlo_presenter_name]</a></h4>
[arlo_presenter_profile label="<h5>Profile</h5>"]
</li>
[arlo_presenter_rich_snippet]
[/arlo_presenter_list_item]
</ul>
[arlo_presenter_list_pagination]
[arlo_powered_by]
Main shortcodes
- Page level: [arlo_breadcrumbs], [arlo_presenter_list_pagination]
- Inside [arlo_presenter_list_item]: the presenter shortcodes listed for the Presenter template, except the event lists.
Presenter
The page for one presenter, with their profile, qualifications and the events they present.
Used by: the presenter page, which the plugin creates for each presenter. There is no host page or shortcode to add.
Structure
There is no list item. Use the arlo_presenter_* shortcodes directly. To show the presenter's events, use [arlo_presenter_events_list] for a ready-made list, or [arlo_presenter_events_list_advanced], an enclosing shortcode that repeats your own markup for each event and lets you use the event shortcodes inside it.
[arlo_presenter_profile_avatar] [arlo_presenter_profile label="<h5>Profile</h5>"] [arlo_presenter_qualifications label="<h5>Qualifications</h5>"] [arlo_presenter_interests label="<h5>Interests</h5>"] [arlo_presenter_social_link network="Facebook" linktext="Facebook"] [arlo_label label="<h5>Events</h5>"] [arlo_presenter_events_list] [/arlo_label] [arlo_powered_by] [arlo_presenter_rich_snippet]
Main shortcodes
- Presenter: [arlo_presenter_name], [arlo_presenter_permalink], [arlo_presenter_link], [arlo_presenter_profile], [arlo_presenter_profile_avatar], [arlo_presenter_qualifications], [arlo_presenter_interests], [arlo_presenter_social_link], [arlo_presenter_rich_snippet]
- Their events: [arlo_presenter_events_list], [arlo_presenter_events_list_advanced]
- Page level: [arlo_breadcrumbs]
Upcoming events widget
The short list of upcoming events that the Upcoming events widget shows in a widget area, such as a sidebar or footer.
Used by: each Upcoming events widget. Unlike the page templates, it is edited in the widget's own Template box and is stored with that widget, not on the Pages tab. A new widget starts with the active theme's widget template.
Structure
The template is one [arlo_upcoming_list_item] block, which repeats once for each event. The widget wraps your template in [arlo_upcoming_widget_list] for you, which applies the widget's number of events and its tag filters, so you do not add it yourself. See Template in the widgets article.
<ul class="arlo-widget-upcoming">
[arlo_upcoming_list_item]
<li>
[arlo_event_start_date format="M"] [arlo_event_start_date format="d"]
<p>[arlo_event_template_permalink wrap="<a href='%s'>"][arlo_event_template_name]</a></p>
<p>[arlo_event_location]</p>
</li>
[arlo_event_rich_snippet]
[/arlo_upcoming_list_item]
</ul>
Main shortcodes
Inside [arlo_upcoming_list_item], the same event and event template shortcodes as the Upcoming events list. The widget has no page-level shortcodes such as filters or pagination.
Only users with the unfiltered_html capability can edit the widget's template. For everyone else it is read-only and the stored template is kept.
Tips
- Keep page-level shortcodes (filters, region selector, pagination, the "no events" message) outside the list item block, and the shortcodes that output one item's fields inside it. Outside their block, item shortcodes have no item to read from and output nothing.
- Put [arlo_event_rich_snippet] and its equivalents inside the list item block, as the bundled templates do, so that each item outputs its own structured data.
- Most shortcodes can add a label or wrap their output in markup with the
labelandwrapattributes. The wrapper is output only when the shortcode has something to show, which keeps empty headings and containers out of the page. The%splaceholder marks where the value goes. See universal attributes and placeholders. - Start from Reload original template, then adjust. It is easier to remove shortcodes you do not need than to build a page from nothing.