-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathnews.php
35 lines (35 loc) · 784 Bytes
/
news.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: News
*/
?>
<?php get_header();?>
<section class="multiple-posts">
<header>
<h1>What’s New?</h1>
</header>
<?php
query_posts(array(
'numberposts' => 0,
));
$counter = 1;
if(have_posts()):while(have_posts()):the_post();
?>
<article class="post <?php echo $counter%2?'odd':'even'?>">
<header>
<h2 class="title"><a href="<?php the_permalink();?>" title="<?php the_title();?>"><?php the_title();?></a></h2>
<div class="meta"><small class="date">Posted on <?php the_date();?> by <?php the_author();?></small></div>
</header>
<div class="entry">
<?php the_excerpt();?>
</div>
</article>
<?php
$counter++;
endwhile;endif;
?>
</section>
<aside class="sidebar">
<?php get_sidebar(); ?>
</aside>
<?php get_footer();?>