Skip to content

Commit

Permalink
feat: Show music on season archive pages
Browse files Browse the repository at this point in the history
  • Loading branch information
delucis committed Mar 4, 2019
1 parent 59fe3db commit ad1d3b1
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions archive-concert.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,33 @@
</section>
<?php endif;

$concerts_with_media = event_query(array(
'post_type' => 'concert',
'has_av' => true,
'after' => $seasonstart,
'before' => $seasonend
));

if (!empty($concerts_with_media)) {
$media_items = array();
foreach ($concerts_with_media as $post) {
while (have_rows('programme')) {
the_row();
$media_item = component('embed_card', array(
'post' => $post
));
if ($media_item) {
$media_items[] = $media_item;
}
}
}
if (!empty($media_items)) {
echo '<section><h3>Music</h3>';
echo component('responsive_card_list', array('cards' => $media_items));
echo '</section>';
}
}

if ($menuitems) {
echo '<footer id="years-nav" class="years-nav"><h3>Explore Seasons</h3><ul>';
foreach ($menuitems as $item) {
Expand Down

0 comments on commit ad1d3b1

Please sign in to comment.