-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
29 lines (28 loc) · 955 Bytes
/
index.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
<?php
get_header(); ?>
<div id="content">
<div id="contentleft">
<?php if(have_posts()) : ?> <!--确认是否有日志-->
<?php while(have_posts()) : the_post(); ?> <!--如果有,则显示全部日志-->
<div id='singlecontent'>
首页图片
<div id='contentpak'>
<h2><a href='<?php the_permalink() ?>' ><?php the_title(); ?></a></h2>
<?php if(has_excerpt()) : ?><!--判断是否有摘要-->
<?php echo mb_substr(strip_tags(get_the_excerpt()),0,28,'utf-8').'...'; ?>
<?php else:?>
<?php echo mb_substr(strip_tags(get_the_content()),0,28,'utf-8').'...'; ?>
<?php endif;?>
<div class="date"><?php the_time('n-j'); ?><br /><?php the_time('l'); ?>
</div>
</div>
<div style="clear:both;"></div>
</div>
<?php endwhile; ?> <!--结束PHP函数”while”-->
<?php endif; ?><!-- 结束PHP函数”if”-->
<div id='border'> </div>
<div id="pagenavi">
<?php posts_nav_link('|','',''); ?>
</div>
</div><!-- end #contentleft-->
<?php get_footer(); ?>