Home - slimndap/wp-theatre GitHub Wiki
Theater for Wordpress
Theme developer documentation
Event listings
Theater comes with two types of event listings:
- A list of all upcoming events.
- A list of upcoming events for a particular production.
A list of all upcoming events
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
}
A list of upcoming events for a particular production.
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
}
Integrations
Ticketing
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.