Created
May 10, 2017 17:14
-
-
Save bjtalbot1/c57bdc4e732e025a964ba477d10022a6 to your computer and use it in GitHub Desktop.
Event Espresso layout problem
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
<?php get_header(); ?> | |
<div id="content" class="event-archive"> | |
<div id="inner-content" class="wrap cf"> | |
<main> | |
<section class="session-header cf"> | |
<div class="m-all t-1of2 d-1of2 cf"> | |
<!-- from the Events category name & description --> | |
<h1><?php the_archive_title(); ?></h1> | |
</div> | |
<div class="m-all t-1of2 d-1of2 last-col cf"> | |
<?php the_archive_description(); ?> | |
</div> | |
</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"> | |
<h2 class="class-title"> | |
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"> | |
<?php the_title(); ?> | |
</a> | |
<span class="grade-age"><?php the_field('grade_age'); ?></span> | |
</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]' ); ?> | |
<?php global $post; | |
$event_obj = $post->EE_Event; | |
if ( $event_obj instanceof EE_Event ) | |
{ espresso_ticket_selector( $event_obj ); } ?> | |
</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 ($show_title): ?> | |
<div class="session-show"> | |
<?php echo $show_image; ?> | |
<?php echo $show_description; ?> | |
</div> | |
<?php endif; ?> | |
</div> | |
</section> | |
<?php endwhile; endif; ?> | |
<div 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_description = $parent_category_array->description; | |
?> | |
<div class="class-col-1 m-all t-1of2 d-2of3 cf"> | |
<!-- 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; ?> | |
</div> | |
<div class="class-col-2 m-all t-1of2 d-1of3 last-col cf"> | |
</div> | |
</div> | |
</main> | |
</div> | |
</div> | |
<?php get_footer(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment