forked from yqkqknct/Simplest-One
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
59 lines (59 loc) · 2.7 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
<?php get_header(); ?>
<div class="gallery">
<?php while ( have_posts() ) : the_post(); ?>
<?php if ( $wp_query->current_post <= 1) { ?>
<?php if ( get_feature_image() && is_option("post_on") ): ?>
<div class="gallery-half" id="gallery<?php echo $wp_query->current_post; ?>"><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><img src="<?php echo get_timthumb('banner'); ?>"></a></div>
<?php endif; ?>
<?php
}
endwhile;
?>
</div>
<?php while ( have_posts() ) : the_post(); ?>
<?php if ( $wp_query->current_post <= 1) { ?>
<article class="article" id="article-gallery<?php echo $wp_query->current_post; ?>">
<div class="article-cont">
<h1 class="cont-title">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" rel="bookmark"><?php the_title(); ?></a>
</h1>
<div class="article-meta">
<div class="meta-time"><i class="icon-time icon-white"></i> <span title="<?php the_time('G:i'); ?>"><?php the_time('m / j , Y'); ?></span></div>
<div class="meta-comment"><i class="icon-comment icon-white"></i> <a href="<?php the_permalink(); ?>#comments" title="查看迴響"><?php comments_number('0','1','%','',''); ?> 迴響</a></div>
<div class="meta-category"><i class="icon-tag icon-white"></i> <?php the_category(' , '); ?></div>
</div>
<div class="cont">
<?php the_content(); ?>
<div class="clearfix"></div>
</div>
</div>
</article>
<?php } else {
if ( $wp_query->current_post % 2 != 0 ){ $var = 2; } else { $var = 1; }
?>
<article class="article">
<div class="article-thumb">
<?php if ( get_feature_image() && is_option("post_on") ): ?>
<img src="<?php echo get_timthumb('small'); ?>" title="<?php the_title(); ?>">
<?php endif; ?>
</div>
<div class="article-cont">
<h1 class="cont-title-small">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" rel="bookmark"><?php the_title(); ?></a>
</h1>
<div class="cont">
<?php the_content(); ?>
<div class="clearfix"></div>
</div>
<div class="article-meta-small">
<div class="meta-time"><i class="icon-time icon-white"></i> <span title="<?php the_time('G:i'); ?>"><?php the_time('m / j , Y'); ?></span></div>
<div class="meta-comment"><i class="icon-comment icon-white"></i> <a href="<?php the_permalink(); ?>#comments" title="查看迴響"><?php comments_number('0','1','%','',''); ?> 迴響</a></div>
<div class="meta-category"><i class="icon-folder-close-alt"></i> <?php the_category(' , '); ?></div>
<div class="meta-category"><i class="icon-tag"></i> <?php the_tags('', ' , ', ''); ?></div>
</div>
</div>
</article>
<?php } endwhile; wp_reset_query(); ?>
<div class='clearfix'></div>
<?php pagenavi(); ?>
<?php get_footer(); ?>