Theme developers - slimndap/wp-theatre GitHub Wiki
This page is outdated. Don't use it.
Theatre 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 WP_Theatre to add an event listing to your template:
WP_Theatre::render_events();
Or generate your own listing:
$events = WP_Theatre::get_events();
foreach ($events as $event) {
echo $event->post()->post_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 singe production template:
$production = new WPT_Production();
$production->render_events();
Or generate your own listing:
$production = new WPT_Production();
foreach ($productions->get_events as $event) {
echo $event->post()->post_title;
// do other stuff with your event
}