/single-event.php Secret
Created
August 11, 2016 02:39
Star
You must be signed in to star a gist
Event single post template
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 class="singleEventContainer"> | |
<div class="singleEventHeader"> | |
<?php if (have_posts()) : ?> | |
<?php if (class_exists('MultiPostThumbnails')) : | |
MultiPostThumbnails::the_post_thumbnail('event', 'header-image', NULL, 'full', NULL, false); | |
endif; ?> | |
</div> | |
<div class="singleEvent"> | |
<h1 class="<?php echo get_post_meta($post->ID, 'Event Text Left or Right', true); ?>"><?php echo get_post_meta($post->ID, 'Event Title', true); ?> | |
</h1> | |
</div> | |
<div class="singleEventTicketButton"> | |
<a class=" <?php echo get_post_meta($post->ID, 'Event Text Left or Right', true); ?>" href="<?php echo get_post_meta($post->ID, 'Ticket Purchase Link', true); ?>" target="_blank"><?php echo get_post_meta($post->ID, 'Ticket Button Text', true); ?> | |
</a> | |
</div> | |
</div> | |
<div id="content"> | |
<div class="singlePost"> | |
<?php while (have_posts()) : the_post(); ?> | |
<div class="programIcon"><?php if (class_exists('MultiPostThumbnails')) : | |
MultiPostThumbnails::the_post_thumbnail('event', 'program-icon', NULL, 'full', NULL, false); | |
endif; ?> | |
</div> | |
<div class="singleEventDate"> | |
<?php echo get_post_meta( get_the_ID(), 'Event Date', true ); ?> | |
</div> | |
<div class="singleEventTitle"> | |
<?php echo get_post_meta( get_the_ID(), 'Event Title', true ); ?> | |
</div> | |
<?php the_content(); ?> | |
<?php endwhile; else : ?> | |
<p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p> | |
<?php endif; ?> | |
</div> | |
</div> | |
<div class="eventFeaturedBlock"> | |
<?php | |
while (have_posts()) : the_post(); | |
if (class_exists('MultiPostThumbnails')) : | |
MultiPostThumbnails::the_post_thumbnail( | |
get_post_type(), | |
'featured-block', $post->ID, 'full',NULL, FALSE); endif; | |
?> | |
<div class="featuredBlockSubheader"> | |
<?php echo get_post_meta( get_the_ID(), 'Featured Block Subheader', true ); ?> | |
</div> | |
<div class="featuredBlockTitle"> | |
<?php echo get_post_meta( get_the_ID(), 'Featured Block Title', true ); ?> | |
</div> | |
<div class="featuredBlockText"> | |
<?php echo get_post_meta( get_the_ID(), 'Featured Block Text', true ); ?> | |
</div> | |
<?php endwhile; ?> | |
</div> | |
<div class="eventMenu"> | |
<?php | |
while (have_posts()) : the_post(); | |
if (class_exists('MultiPostThumbnails')) : | |
MultiPostThumbnails::the_post_thumbnail( | |
get_post_type(), | |
'menu-background', $post->ID, 'full',NULL, FALSE); endif; | |
?> | |
<div class="providedBy"> | |
<?php echo get_post_meta( get_the_ID(), 'Menu Provided By', true ); ?> | |
</div> | |
<div class="menuTitle"> | |
<?php echo get_post_meta( get_the_ID(), 'Menu Title', true ); ?> | |
</div> | |
<ul class="MenuItems"> | |
<?php | |
$menuItems = get_post_meta($post->ID, "Menu Item", false); | |
if ($menuItems[0]=="") { ?> | |
<?php } else { ?> | |
<?php foreach($menuItems as $menuItems) { | |
echo '<li>'.$menuItems.'</li>'; | |
} ?> | |
<?php } ?> | |
<?php endwhile; ?> | |
</ul> | |
</div> | |
<?php get_footer(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment