-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
38 lines (34 loc) · 1.21 KB
/
index.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
<section class="splash index-splash" style="background-image: url('<?php if ( has_post_thumbnail() ) {
the_post_thumbnail_url('custom-splash');
} else {
echo bloginfo('template_directory') . "/dist/images/default-news.jpg";
} ?>')">
<div class="container">
<div class="row">
<h1 class="headline info-title"><?php get_template_part('templates/page', 'header'); ?></h1>
</div>
</div>
</section>
<section class="main-content">
<div class="container">
<div class="row news-row">
<?php if (!have_posts()) : ?>
<div class="alert alert-warning">
<?php _e('Sorry, no results were found.', 'sage'); ?>
</div>
<?php endif; ?>
<?php while (have_posts()) : the_post(); ?>
<?php get_template_part('templates/content', get_post_type() != 'post' ? get_post_type() : get_post_format()); ?>
<?php endwhile; ?>
</div>
<h2 class="screen-reader-text">Posts navigation</h2>
<div class="nav-links">
<?php if( get_previous_posts_link() ): ?>
<div class="nav-next"><?php previous_posts_link( '« Newer Posts' ); ?></div>
<?php endif ?>
<?php if( get_next_posts_link() ): ?>
<div class="nav-previous"><?php next_posts_link( 'Older Posts »', '' ); ?></div>
<?php endif ?>
</div>
</div>
</section>