single.php 915 Bytes
Newer Older
1
2
3
4
<?php get_header(); ?>

	<main id="primary" class="site-main">

Benthe Kuijpers's avatar
Benthe Kuijpers committed
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
		<div class="single__content">
			<?php
			while ( have_posts() ) :
				the_post();

				if (has_post_thumbnail()) { ?>
					<div class="single__image"><?php echo get_the_post_thumbnail($post, 'large'); ?></div>
				<?php } ?>

				<div class="container container--small">

					<?php $categories = get_the_category(); ?>
					
					<?php if (!empty($categories)) {
						$cat_string = join(', ', wp_list_pluck($categories, 'name'));
						echo '<span class="label">' . $cat_string . '</span>';
					} ?>

					<h1><?php the_title(); ?></h1>
					<?php the_content(); ?>

					<div class="single__button">
						<a href="<?php echo get_permalink(get_option('page_for_posts')); ?>" class="btn btn--red btn--back"><?php _e('see all news', 'makeitopen'); ?></a>
					</div>

				</div>

			<?php endwhile; ?>

34
		</div>
35
36
37
38

	</main>

<?php get_footer(); ?>