Advertisement
Guest User

AJ Troxell

a guest
Feb 15th, 2011
280
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. <?php get_header(); ?>
  2. <?php get_sidebar(); ?>
  3. <div id="content">
  4. <?php $count = 1;
  5. $col_count = 3;
  6. $num_of_posts = $wp_query->post_count;
  7. $post_per_column = ceil($num_of_posts / $col_count); ?>
  8. <div id="col1">
  9. <?php query_posts($query_string . '&cat=-121,-123,-124,-125,-126'); ?>
  10. <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
  11. <div class="item entry" id="post-<?php the_ID(); ?>"></div>
  12. <?php global $post; ?>
  13. <?php
  14. $src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), array( 5600,1000 ), false, '' );
  15. ?>
  16. <div class="post" style="background: url(<?php echo $src[0]; ?>) #fff no-repeat;">
  17. <div class="post_title"><h2><a href="<?php the_permalink(); ?>" title="<?php echo get_the_excerpt(); ?>"><?php the_title(); ?></a></h2></div>
  18. <div class="post_comments"><div class="date"><?php the_date('m/d/y'); ?></div><a href="<?php the_permalink(); ?>#comments"><?php comments_number('no comments', '1 comment', '% comments' );?></a></div>
  19. </div>
  20. <?php if($count == $post_per_column) { echo '</div><div id="col2">'; }
  21. if($count == 2*$post_per_column) { echo '</div><div id="col3">'; }
  22. $count++;
  23. endwhile;
  24. ?>
  25. <?php endif; ?>
  26. </div>
  27. <div class="nav-previous"><?php next_posts_link( __( '&laquo; Older' ) ); ?></div>
  28. <div class="nav-next"><?php previous_posts_link( __( 'Newer &raquo;' ) ); ?></div>
  29. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement