SHOW:
|
|
- or go back to the newest paste.
1 | - | <?php |
1 | + | |
2 | - | query_posts('showposts=1');?> |
2 | + | |
3 | ||
4 | <?php if( $wp_query->current_post == 0 ) : | |
5 | //section for the first post begins ?> | |
6 | ||
7 | <?php the_post_thumbnail();?> | |
8 | - | <?php endwhile; endif; wp_reset_query();?> |
8 | + | |
9 | ||
10 | <?php //section for first post ends | |
11 | - | <?php $my_query = new WP_Query('posts_per_page=1'); |
11 | + | else : |
12 | - | while ($my_query->have_posts()) : $my_query->the_post(); |
12 | + | // section for all other posts begins ?> |
13 | - | $do_not_duplicate = $post->ID;?> |
13 | + | |
14 | - | <?php if (have_posts()) : ?> |
14 | + | |
15 | - | <?php while (have_posts()) : the_post(); ?> |
15 | + | |
16 | <div class="content"> | |
17 | <h2 class="title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> | |
18 | <?php the_excerpt(); ?> | |
19 | </div><!-- end of content --> | |
20 | <div class="meta"> | |
21 | <ul><li><?php the_time('m.d.y') ?></li>|<li><?php the_author(); ?></li></ul> | |
22 | <?php if($show_comments == 'true'): ?><div class="postcomments"><?php comments_popup_link('No Comment', '1 Comment', '% Comments'); ?></div><?php endif; ?> | |
23 | </div><!-- end of meta --> | |
24 | </div> | |
25 | ||
26 | <?php //section for all other posts ends | |
27 | endif; ?> | |
28 | ||
29 | <?php endwhile; ?> | |
30 | <?php endif; ?> | |
31 | - | <?php endif; wp_reset_query();?> |
31 | + | <?php if(function_exists('wp_pagenavi')) wp_pagenavi(); ?> |