/
page-news copy.php
57 lines (48 loc) · 1.25 KB
/
page-news copy.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
<?php
/**
* The template for displaying all pages.
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages
* and that other 'pages' on your WordPress site will use a
* different template.
*
* Author: Vludio
* Author URI: http://vludio.nl/
*
*
* Template Name: News
*
*
*/ ?>
<?php get_header(); ?>
<?php
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$loop = new WP_Query(array('post_type' => 'breaking-news', 'posts_per_page' => 24, 'paged' => $paged));
?>
<section id="latest-news" class="white-bg section-txt">
<div class="wrap">
<div class="centered-text">
<h2><?php the_title(); ?></h2>
<ul class="news-list">
<?php
//$i=0;
while ($loop->have_posts()) {
$loop->the_post();
?>
<li><a href="<?php the_permalink(); ?>" class="title"><?php the_title(); ?></a><span class="date"><?php echo get_the_date('j F Y'); ?></span></li>
<?php
if ($i % 2) {
//echo '<div class="clearfix"></div>';
}
$i ++;
}
?>
</ul>
<p></p>
</div>
</div>
</section> <!-- end latest-news -->
<!-- PAGE SIDEBAR -->
<?php if( dynamic_sidebar('page_sidebar') ); ?>
<?php get_footer(); ?>