home.php 752 Bytes
Newer Older
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
<?php get_header(); ?>

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

		<div class="container">

			<div class="page-header">
				<h1><?php single_post_title(); ?></h1>
			</div>

			<div class="grid grid--large">
				<?php

				if( have_posts() ) :
					while( have_posts() ) : the_post();		
						$news_post = get_post(get_the_ID());
						include(locate_template('template-parts/elements/news-teaser.php'));
					endwhile;

				endif; ?>
			</div>

			<?php
			global $wp_query; 

			if (  $wp_query->max_num_pages > 1 ) { ?>
				<div class="load-more">
					<div class="btn btn--down btn--red js-load-more">
						<?php _e('load more news', 'makeitopen'); ?>
					</div>
				</div>
			<?php } ?>
			
		</div>

	</main><!-- #main -->

<?php
get_footer();