-
Notifications
You must be signed in to change notification settings - Fork 0
/
page-blognews.php
35 lines (25 loc) · 997 Bytes
/
page-blognews.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
<?php
/*
* Template Name: Blog News
*/
get_header(); include('inc/inc-page-blognews.php');
?>
<div class="container">
<div class="row wide-gutter-row">
<div class="col-sm-8 wide-gutter-col">
<h1 class="page-heading"><?php echo get_the_title() ?></h1>
<?php if ($the_query->have_posts()) : $i=0; while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
<?php if ($i !== 0 ) : ?><hr><?php endif ?>
<h3><a href="<?php echo get_permalink() ?>"><?php echo get_the_title() ?></a></h3>
<p class="medium-heavy"><?php echo get_the_date() ?> – <?= cat_output() ?></p>
<p><?php echo wp_trim_words(get_the_excerpt()) ?></p>
<p><a href="<?php echo get_permalink() ?>" class="btn btn-primary">Read more ›</a></p>
<?php $i++; endwhile; endif; ?>
<?php wp_pagenavi(array( 'query' => $the_query )); ?>
</div>
<aside class="col-sm-4">
<?php get_template_part( 'content', 'sidebar' ); ?>
</aside>
</div>
</div>
<?php get_footer();?>