-
Notifications
You must be signed in to change notification settings - Fork 0
/
single-event.php
32 lines (32 loc) · 1.29 KB
/
single-event.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php get_header(); ?>
<?php if (have_posts()): while (have_posts()) : the_post(); ?>
<section id="content">
<div class="page-thumbnail">
<?php if (has_post_thumbnail() ): ?>
<?php $featuredImage = wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); ?>
<div class="page-hero" style="background:url(<?php echo $featuredImage; ?>)no-repeat center center;"></div>
<?php else: ?>
<?php $featuredImage = wp_get_attachment_url( get_post_thumbnail_id(252) ); ?>
<div class="page-hero" style="background:url(<?php echo $featuredImage; ?>)no-repeat center center;"></div>
<?php endif ?>
</div>
<div class="page-content row">
<div class="wordpress-import col col--9-of-12">
<h1 class="page-title"><?php the_title(); ?></h1>
<?php if (has_excerpt() ):?>
<h2 class="page-excerpt"> <?php the_excerpt(); ?> </h2>
<?php else: ?> <!-- don't display anything because it seems to grab the first paragraph -->
<?php endif ?>
<?php the_content(); ?>
</div>
<aside class="sidebar col col--3-of-12" role="complementary">
<?php get_sidebar(); ?>
</aside>
<?php endwhile; ?>
<?php endif; ?>
<?php rewind_posts();?>
<?php wp_reset_query();?>
<br class="clear">
</div>
<?php get_footer(); ?>
</section>