Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $c = 1; //init counter
- $do_not_duplicate = array(); //init array
- $bpr = 3; //boxes per row
- $my_query = new WP_Query('category_name=Artists&posts_per_page=3&orderby=rand');
- while ($my_query->have_posts()) : $my_query->the_post();
- $do_not_duplicate[] = $post->ID ?>
- <div class="postgrid" id="post-<?php the_ID(); ?>">
- <div class="postthumb">
- <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail('grid-post-image'); ?></a><div class="borderthumb"></div><div class="posttitle"><h1><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1>
- <p><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">Click for more</a></p></div>
- </div>
- </div>
- <?php endwhile; ?>
- <div class="clr">
- </div>
- </div>
- <div class="gridContainer">
- <?php
- $c = 1; //init counter
- $bpr = 3; //boxes per row
- $my_query = new WP_Query(array('category_name' => 'performance', 'posts_per_page' => 3, 'orderby' => 'rand', 'post__not_in' => $do_not_duplicate));
- while ($my_query->have_posts()) : $my_query->the_post(); ?>
- <div class="postgrid" id="post-<?php the_ID(); ?>">
- <div class="postthumb">
- <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail('grid-post-image'); ?></a><div class="borderthumb"></div><div class="posttitle"><h1><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1>
- <p><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">Click for more</a></p></div>
- </div>
- </div>
- <?php endwhile; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement