-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.php
101 lines (90 loc) · 3.68 KB
/
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
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<?php get_header(); ?>
<div id="content">
<section class="layout">
<?php $options = get_option('loper_options'); ?>
<?php if($options['slideshowornot']) : ?>
<?php include(TEMPLATEPATH . '/slideshow.php'); ?>
<?php endif; ?>
<article class="index">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php if ( has_post_format( 'audio' )): ?>
<div class="clear"></div>
<section class="tune">
<h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<div class="clear"></div>
<span class="catemusic left"><?php the_content(__(''));?></span> <span class="time right" ><?php edit_post_link('<span class="edit">[edit] </span>');?></span>
</section>
<div class="clear"></div>
<div class="postmusic"></div>
<?php else: ?>
<!--一般-->
<div class="clear"></div>
<section class="title">
<h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<div class="clear"></div>
<span class="cate left">
<span class="singletime"><?php the_time('Y.m.d'); ?></span>
<!--<span class="singleview"><?php the_category(', '); ?></span>-->
<span class="singlecom">
<?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?>
</span>
<?php if(function_exists('the_views')) {the_views();} ?>
</span>
<span class="time right" >
<?php edit_post_link('<span class="edit">[edit] </span>');?>
</span>
</section>
<section class="postcontents cf">
<?php if($options['thumbnail']) : ?>
<?php
echo '<div class="thumbnailbg">';echo '<a href="';the_permalink() ;echo '" rel="nofollow">';post_thumbnail( 120,100 );echo '</a>';echo '</div>';
?>
<?php else : ?>
<?php if ( has_post_thumbnail() ) {
echo '<div class="thumbnailbg">';echo '<a href="';the_permalink() ;echo '" rel="nofollow">';post_thumbnail( 120,100 );echo '</a>';echo '</div>';
} else { }
?>
<?php endif; ?>
<div class="post-content cf">
<?php if($options['cms']) : ?>
<p>
<?php echo cut_str(strip_tags(apply_filters('the_content',$post->post_content)), 180); ?></p>
<?php else : ?>
<?php the_content(__(''));?>
<?php endif; ?>
<div class="clear"></div>
<div class="post-meta" >
<a class="post-more" href="<?php the_permalink() ?>" title="continue" rel="nofollow"></a>
<span class="post-tags"><?php if (the_tags('Tags: ', ', ', ' ')); ?></span>
<div class="clear"></div>
</div><!--.postMeta-->
</div>
</section>
<!--一般-->
<?php endif; ?>
<?php endwhile; else: ?>
<!--错误页面-->
<div class="no-results">
<h3>出错了,你查看的内容不存在。</h3>
<p>请试试搜索。另外你可以点击导航栏的Archives或Tags以找到你想要的东西。 </p>
<p>以下是<strong>最近10篇文章</strong>,或许你会感兴趣。 </p>
<ul><?php get_archives('postbypost', 10); ?></ul>
</div>
<?php endif; ?>
<div class="clear"></div>
<nav id="oldernewer">
<table>
<tbody>
<tr>
<td><span class=pageprevious><?php previous_posts_link('上一页')?></span></td>
<td class="pagenumber"><?php par_pagenavi(9); ?></td>
<td><span class=pagenext><?php next_posts_link('下一页')?></span></td>
</tr>
</tbody>
</table>
</nav>
</article>
</section>
<?php get_sidebar(); ?>
</div><!--#content-->
<?php get_footer(); ?>