?> data-page="<?php echo $paged; ?> "> <?php get_template_part('partials/nav'); ?> <?php get_template_part('partials/side'); ?> <div class="content"> <div class="wrapper upcoming"> <h2 class="title head">Current and Upcoming Events & Exhibitions</h2> <?php $sorted_events = sort_upcoming_events(); $count = sizeof($sorted_events); if ($count) { echo '<div class="events shelves grid items residents upcoming">'; foreach ($sorted_events as $event) { $post = $event; global $post; get_template_part('sections/items/event'); } echo '</div>'; } else { get_template_part('partials/no-posts'); } wp_reset_query(); ?> </div>
<section <?php section_attr(null, 'home', null, 'International Studio & Curatorial Program'); ?> data-title="Home"> <?php get_template_part('partials/nav'); ?> <?php get_template_part('partials/side'); ?> <div class="content"> <h2 class="head"> International Studio & Curatorial Program </h2> <?php $sorted_events = array_slice(sort_upcoming_events(), 0, 3); $count = sizeof($sorted_events); $count_class = 'cols_' . $count; if ($count) { echo '<h3 class="title">'; $events_id = get_page_by_path('events')->ID; $events_permalink = get_the_permalink($events_id); echo '<a href="' . $events_permalink . '">Events & Exhibitions</a>'; echo '</h3>'; echo '<div class="events module shelves grid upcoming ' . $count_class . '">'; echo '<div class="eventsWrap">'; foreach ($sorted_events as $event) { $post = $event; global $post; get_template_part('sections/items/event'); }