Show dates and prices for the events of a production. Place this code inside your template (eg. single.php or sidebar.php) at the position that you would like the dates and prices to appear.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Show dates and prices for the events of this production. | |
*/ | |
if ( is_singular( 'wp_theatre_prod' ) ) { | |
$production = new WPT_Production(); | |
echo '<ul>'; | |
foreach ( $production->events() as $event ) { | |
echo '<li>'.$event->startdate_html().$event->prices_html().'</li>'; | |
} | |
echo '</ul>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment