SHOW:
|
|
- or go back to the newest paste.
1 | <div id="gridContainer"> | |
2 | <?php | |
3 | $c = 1; //init counter | |
4 | $bpr = 3; //boxes per row | |
5 | query_posts( | |
6 | - | array( |
6 | + | array_merge( |
7 | - | 'posts_per_page' => 6 //put number of posts per page here |
7 | + | $wp_query->query, |
8 | - | 'paged' => (get_query_var('page')) ? get_query_var('page') : 1; |
8 | + | array( |
9 | - | 'cat' => 1 //ID of category to limit to here |
9 | + | 'posts_per_page' => 6 //put number of posts per page here |
10 | ) | |
11 | ) | |
12 | ); | |
13 | if(have_posts()) : | |
14 | while(have_posts()) : | |
15 | the_post(); | |
16 | ?> | |
17 | <div class="post" id="post-<?php the_ID(); ?>"> | |
18 | <h1 class="title"><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1> | |
19 | <div class="postImage"> | |
20 | <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail('grid-post-image'); ?></a> | |
21 | </div> | |
22 | <div class="postExcerpt"> | |
23 | <?php the_excerpt(); ?> | |
24 | </div> | |
25 | </div> | |
26 | <?php | |
27 | if($c == $bpr) : | |
28 | ?> | |
29 | <div class="clr"></div> | |
30 | <?php | |
31 | $c = 0; | |
32 | endif; | |
33 | ?> | |
34 | <?php | |
35 | $c++; | |
36 | endwhile; | |
37 | endif; | |
38 | ?> | |
39 | <div class="clr"></div> | |
40 | </div> |