Skip to content
Jeroen Schmit edited this page Apr 14, 2014 · 48 revisions

Theatre comes with several shortcodes which can be used to insert content inside posts and pages.

Event listing

Lists all upcoming events:

[wpt_events]

Arguments

  • paginateby {month and/or category} Paginate by month and/or category. If set a month and/or category navigation is added to the top of the listing. Default <empty>.
  • groupby {month or category} Group by month or category. If set a month or category header is added at the start of each group. Default <empty>.
  • limit {number} The maximum number of events to show. No maximum when left empty.
  • production {number} The ID of a production. Only show events that belong to a particular production. Default <empty>.
  • season {number} The ID of a season. Only show events that belong to aproduction of a particular season. Default <empty>.
  • category {string} An array of category names (slugs). Only show events that belong to a production within certain categories. Default <emtpy>.

Template

The event listing uses a template to generate the HTML for each event. The default template is:

{{thumbnail}} {{title}} {{remark}} {{datetime}} {{location}} {{tickets}}

It is possible to use your own template by using an enclosing shortcode:

[wpt_events]<h3>{{title}}</h3><p>{{datetime}}}<br />{{location}}</p>[/wpt_events]

Available fields:

  • {{thumbnail}}
  • {{title}}
  • {{remark}}
  • {{date}}
  • {{time}}
  • {{datetime}}
  • {{location}}
  • {{tickets}}
  • {{duration}}

More examples

Show all upcoming events, grouped by month:

[wpt_events groupby="month"]

Show all upcoming events, paginated by category:

[wpt_events paginateby="category"]

Show all upcoming events, paginated by category and month:

[wpt_events paginateby="category,month"]

Show all upcoming events, paginated by month and grouped by category:

[wpt_events paginateby="month" groupby="category"]

Show the first 10 upcoming events:

[wpt_events limit="10"]

Show events in the drama and music categories:

[wpt_events category="drama,music"]

Production event listing

Lists all upcoming events for a production:

[wpt_production_events]

Can be used on the page of a production.

Template

The event listing uses the same default template and fields as the regular event listing. You can use an enclosing shortcode to add your own template:

[wpt_production_events]{{remark}} {{datetime}} {{location}} {{tickets}}[/wpt_production_events]

Event ticket link

Display the ticket link for an event.

Arguments

  • id The ID of the event.

Example:

[wpt_event_ticket_button id="123"]

Production listing

Lists all productions:

[wpt_productions]

Arguments

  • paginateby {season and/or category} Paginate by season and/or category. If set a season and/or category navigation is added to the top of the listing. Default <empty>.
  • groupby {season or category} Group by season or category. If set a season or category header is added at the start of each group. Default <empty>.
  • upcoming {true or false} Only show productions that have upcoming events. Default false.
  • limit {number} The maximum number of productions to show. No maximum when left empty.
  • season {number} The ID of a season. Only show productions of a particular season. Default <empty>.
  • category {string} An array of category names (slugs). Only show productions within certain categories. Default <emtpy>.

Template

The event listing uses a template to generate the HTML for each event. The default template is:

{{thumbnail}} {{title}} {{dates}} {{cities}}

It is possible to use your own template by using an enclosing shortcode:

[wpt_productions]<h3>{{title}}</h3><p>{{datese}}}<br />{{cities}}</p>[/wpt_productions]

Available fields:

  • {{thumbnail}}
  • {{title}}
  • {{dates}}
  • {{cities}}
  • {{excerpt}}
  • {{summary}}

More examples

Show all upcoming productions:

[wpt_productions upcoming="1"]

Show all productions, grouped by season:

[wpt_productions upcoming groupby="season"]

Show all productions, paginated by season:

[wpt_productions paginateby="season"]

Show all productions, paginated by season and grouped by category:

[wpt_productions paginateby="season" groupby="category"]

Show all upcoming events with the production title and summary:

[wpt_productions fields="title,summary"]

Show the first 10 upcoming productions:

[wpt_productions limit="10"]

Show productions in the drama and music categories:

[wpt_productions category="drama,music"]
Clone this wiki locally