-
Notifications
You must be signed in to change notification settings - Fork 1
/
home.php
34 lines (34 loc) · 1.45 KB
/
home.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
<?php get_header(); ?>
<div class="w970">
<div id="main">
<?php
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args = array(
'order' => DESC,
'caller_get_posts' => 1,
'paged' => $paged
);
query_posts($args);
if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="media">
<div class="media-body">
<h2 class="media-heading"><a href="<?php the_permalink() ?>" ><?php the_title(); ?></a></h2>
<div class="row">
<div class="span1"><span class="label label-info"><?php the_time('m-d');?></span></div>
<div class="span1"><span class="label label-info"><?php comments_number('0', '1', '%'); ?>人评论</span></div>
<div class="span1"><span class="label label-info"><?php if(function_exists('the_views')) echo the_views(); ?></span></div>
</div>
<?php echo mb_strimwidth(strip_tags(apply_filters('the_content', $post->post_content)), 0, 136, '...'); ?><br />
<?php dm_the_thumbnail();?>
</div>
</div>
<?php endwhile; else: ?>
<div class="post">你还没开始写你的日志吧,赶紧去后台写一篇试试吧。<a title="Home" class="active" href="<?php echo get_option('home'); ?>/">这里</a>回首页看看吧</div>
<?php endif; ?>
<div class="pagination">
<ul><?php par_pagenavi(9); ?></ul>
</div>
</div>
<?php get_sidebar(); ?>
</div>
<?php get_footer(); ?>