Skip to content

Instantly share code, notes, and snippets.

@bjtalbot1
Last active May 9, 2017 18:47
Show Gist options
  • Save bjtalbot1/15c0a82246887dc922959aa270361980 to your computer and use it in GitHub Desktop.
Save bjtalbot1/15c0a82246887dc922959aa270361980 to your computer and use it in GitHub Desktop.
<?php get_header(); ?>
<div id="content" class="event-archive">
<div id="inner-content" class="wrap cf">
<main>
<section class="session-header cf">
<!-- from the Events category name & description -->
<h1><?php the_archive_title(); ?></h1>
<?php the_archive_description(); ?>
</section>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<section id="post-<?php the_ID(); ?>" <?php post_class('class-block cf'); ?>>
<div class="class-col-1 m-all t-1of2 d-2of3 cf">
<h4><?php the_field('grade_age'); ?></h4>
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<?php the_content(); ?>
<p class="instructors"><?php the_field('instructors'); ?></p>
<div class="class-registration">
<?php //espresso_event_reg_button(); ?>
<?php espresso_list_of_event_dates(); ?>
<?php echo do_shortcode( '[ESPRESSO_TICKET_SELECTOR]' ); ?>
</div>
</div>
<div class="class-col-2 m-all t-1of2 d-1of3 last-col cf">
<?php
$show_title = get_field('show_title');
$show_title_suffix = get_field('show_title_suffix');
$show_description = get_field('show_description');
$show_image = wp_get_attachment_image(get_field('show_image'), 'full');
?>
<?php if ( has_post_thumbnail() ): ?>
<div class="class-image">
<?php the_post_thumbnail( 'full' ); ?>
</div>
<?php endif; ?>
<?php if ($show_title): ?>
<div class="session-show">
<!-- <h5>This season&rsquo;s production</h5> -->
<?php echo $show_image; ?>
<!-- <h3><?php echo $show_title; ?> <span class="smaller"><?php echo $show_title_suffix; ?></span></h3> -->
<?php echo $show_description; ?>
</div>
<?php endif; ?>
</div>
</section>
<?php endwhile; endif; ?>
<section class="policies cf">
<?php
$all_event_categories = wp_get_post_terms($post->ID, 'espresso_event_categories');
$parent_category_id = $all_event_categories[0]->parent;
$parent_category_array = get_term_by('id', $parent_category_id, 'espresso_event_categories');
$parent_category_name = $parent_category_array->name;
$parent_category_description = $parent_category_array->description;
?>
<!-- from the Events parent category, e.g. Regular Classes or SummerStage -->
<h2>Policies<!-- for <?php echo $parent_category_name; ?> --></h2>
<?php echo $parent_category_description; ?>
</section>
</main>
</div>
</div>
<?php get_footer(); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment