-
Notifications
You must be signed in to change notification settings - Fork 23
Home
Jeroen Schmit edited this page Mar 11, 2015
·
8 revisions
Theme developer documentation
Theater comes with two types of event listings:
- A list of all upcoming events.
- A list of upcoming events for a particular production.
You can use a shortcode to show an event listing in a post or a page.
You can also use the global $wp_theatre variable to add an event listing to your template:
echo $wp_theatre->events->get_html();
Or generate your own listing:
$args = array(
'start' =>'now',
);
$events = $wp_theatre->events->get($args);
foreach ($events as $event) {
echo $event->title();
// do other stuff with your event
}
The Wordpress admin already has some options to add events listings to production pages.
You can also use the WPT_Production class to add an event listing to your production template:
$args = array(
'production' => get_the_id(),
'start' => 'now'
);
echo $wp_theatre->events->get_html();
Or generate your own listing:
$args = array(
'production' => get_the_id(),
'start' => 'now'
);
$events = $wp_theatre->events->get($args);
foreach ($events as $event) {
echo $event->title();
// do other stuff with your event
}
Theatre integrates nicely with existing Ticketing solutions. Available integrations:
Need integration with another ticketing system? Drop me an email and I will look into it.