-
-
Save anonymous/3081731130acddc43bea02d37ee2ac05 to your computer and use it in GitHub Desktop.
Parent Training Page
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(); ?> | |
<? if (has_post_thumbnail() ): ?> | |
<div id="featured-image"> | |
<figure> | |
<? echo the_post_thumbnail('large'); ?> | |
</figure> | |
<? css_info(); ?> | |
</div> | |
<? else : endif; ?> | |
<div id="page" class="site"> | |
<div id="primary" class="site-content row"> | |
<main id="main" class="site-main small-12 medium-12 large-12 columns" role="main"> | |
<? if (has_post_thumbnail() ): else : ?> | |
<header class="entry-header"> | |
<? css_info(); ?> | |
</header> | |
<? endif; ?> | |
<? | |
$paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1; | |
$custom_args = array( | |
'post_type' => 'training', | |
'orderby' => 'menu_order', | |
'order' => 'ASC', | |
'posts_per_page' => -1, | |
); | |
$custom_query = new WP_Query( $custom_args ); | |
?> | |
<? if ( $custom_query->have_posts() ) : ?> | |
<div class="css-columns"> | |
<?while ( $custom_query->have_posts() ) : $custom_query->the_post(); ?> | |
<article id="post-<? the_ID(); ?>" <? post_class(); ?>> | |
<h4 class="divider"><? the_title(); ?></h4> | |
<? if ( has_post_thumbnail() ) { ?><figure><? the_post_thumbnail('medium'); ?></figure><? } ?> | |
<div class="article-teaser"> | |
<? if( get_field('registration_type') == 'No' ): ?> | |
<p class="event-date"><strong>Date:</strong> Request a Date</p> | |
<p class="event-location"><strong>Location:</strong> <? the_field('location_without_registration'); ?></p> | |
<a class="button full-width" title="Find out more about '<? the_title(); ?>'" href="<? the_permalink(); ?>">More Info</a> | |
<? elseif( get_field('registration_type') == 'Yes' ): ?> | |
<? if( get_field('multiple_dates') == 'Multiple' ): ?> | |
<p class="event-date"><strong>Date: </strong> Multiple Dates</p> | |
<? elseif( get_field('multiple_dates') == 'Single' ): ?> | |
<p class="event-date"><strong>Date: </strong><? the_field('training_date'); ?></p> | |
<? endif; ?> | |
<p class="event-location"><strong>Location:</strong> <? the_field('location_with_registration'); ?></p> | |
<a class="button full-width test" title="Find out more about '<? the_title(); ?>'" href="<? the_permalink(); ?>">More Info</a> | |
<a class="button full-width register-now" title="Register for '<? the_title(); ?>'" href="<? the_permalink(); ?>#registration-dates">Register Now</a> | |
<? endif; ?> | |
</div> | |
</article> | |
<?endwhile; ?> | |
</div> | |
<? wp_reset_postdata(); ?> | |
<? the_content(); ?> | |
<? else: ?> | |
<? get_template_part('content', 'none'); ?> | |
<? endif; ?> | |
</main> | |
</div> | |
</div> | |
<? get_footer(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment