-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathblog.php
More file actions
50 lines (43 loc) · 1.24 KB
/
blog.php
File metadata and controls
50 lines (43 loc) · 1.24 KB
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
<?php
/**
* @package WordPress
Template Name: Blog
*/
get_header(); ?>
<div id="content" class="row">
<div class="offset1 span12 columns">
<?php
$posts_per_page = 5;
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args = array(
'orderby' => 'date',
'order' => 'DESC',
'posts_per_page' => $posts_per_page,
'paged' => $paged
);
$wp_query = new WP_Query($args);
while ( $wp_query->have_posts() ) : $wp_query->the_post() ?>
<div id="post-<?php the_ID() ?>">
<h2>
<a href="<?php the_permalink() ?>" title="" rel="bookmark"><?php the_title() ?></a>
</h2>
<ul id="meta" class="row unstyled">
<li class="span4 columns">Posted on <?php the_time('F jS, Y'); ?></li>
<li class="span4 columns">Written by <?php the_author(); ?></li>
<li class="span4 columns">
<?php comments_popup_link('No Comments Yet', '1 Comment', '% Comments'); ?>
</li>
</ul>
<div class="entry">
<?php the_excerpt() ?>
</div>
<p class="postmetadata">
<?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> |
<?php edit_post_link('Edit', '', ' | '); ?>
<?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?>
</p>
</div>
<?php endwhile; ?>
</div>
</div>
<?php get_footer(); ?>