-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle-beer.php
75 lines (50 loc) · 3.25 KB
/
single-beer.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?php
/**
* @package WordPress
*/
get_header(); ?>
<div class="main-content-wrapper">
<div class="content-wrapper">
<main class="main beer" role="main">
<?php if (have_posts()): ?>
<?php while (have_posts()): the_post(); ?>
<article <?php post_class() ?> id="post-<?php the_ID(); ?>">
<a href="/beer_type/solid-ales/" class="allBeerLink">All Beers</a>
<h1><?php the_title(); ?></h1>
<div class="beer" id="post-<?php the_ID(); ?>">
<?php if(get_field('archive_image')) { ?>
<div class="left">
<img src="<?php the_field('archive_image'); ?>" alt="Photo of <?php the_title(); ?>" />
</div><!--left-->
<?php } ?>
<?php if(get_field('archive_image')) { ?>
<div class="right">
<?php } ?>
<div class="top"><?php the_content(); ?></div>
<?php if(get_field('availability')) { ?><p><strong>Beer Name:</strong><?php the_field('availability'); ?></p><?php } ?>
<?php if(get_field('package_size')) { ?><p><strong>Beer Style:</strong><?php the_field('package_size'); ?></p><?php } ?>
<?php if(get_field('abv')) { ?><p><strong>ABV %:</strong><?php the_field('abv'); ?></p><?php } ?>
<?php if(get_field('grains')) { ?><p><strong>IBU:</strong><?php the_field('grains'); ?></p><?php } ?>
<?php if(get_field('hops')) { ?><p><strong>Serving Style:</strong><?php the_field('hops'); ?></p><?php } ?>
<?php if(get_field('spices')) { ?><p><strong>Seasonal Availability:</strong><?php the_field('spices'); ?></p><?php } ?>
<?php if(get_field('yeast')) { ?><p><a href="<?php the_field('yeast'); ?>" target="_blank"><strong>Untappd</strong></p><?php } ?>
<?php if(get_field('archive_image')) { ?>
</div><!--right-->
<?php } ?>
</div><!--/post-->
</article>
<?php endwhile; ?>
<?php if( get_previous_posts_link() ) : ?>
<span class="pagination button alignleft"><?php previous_posts_link('« Newer Entries'); ?></span>
<?php endif; ?>
<?php if( get_next_posts_link() ) : ?>
<span class="pagination button alignright"><?php next_posts_link('Older Entries »'); ?></span>
<?php endif; ?>
<?php else: ?>
<?php get_template_part('notfound'); ?>
<?php endif; ?>
</main><!--/main-->
<?php get_sidebar(); ?>
</div><!--/content-wrapper-->
</div><!--/main-content-wrapper-->
<?php get_footer(); ?>