Advertisement
Guest User

wordpress loop

a guest
Aug 6th, 2011
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. <div class="columns-wrapper">
  2.  
  3.  
  4. <?php
  5. $count = 0;
  6.  
  7. while(have_posts()) : the_post()
  8. ?>
  9.  
  10. <div class="box<?php if( $count%2 == 0 ) { echo '-1'; }; $count++; ?>">
  11.  
  12. <a href="<?php the_permalink(); ?>">
  13. <h1><?php the_title(); ?></h1></a> <div class="entry-meta"> posted on <?php the_time('jS F Y') ?> &#124; by <?php the_author(); ?></div>
  14. <?php the_post_thumbnail (); ?><?php the_content(); ?>
  15.  
  16. <!--and other output of the loop -->
  17.  
  18. </div>
  19.  
  20. <?php endwhile; ?> <?php rewind_posts();?>
  21. </div><!--end columns-wrapper-->
  22.  
  23. <div class="navigation"><p><?php posts_nav_link('&#8734;','Go
  24. Forward In Time','Go Back in Time'); ?></p></div>
  25.  
  26. ----------------
  27. STYLES
  28.  
  29.  
  30. .box-1 { float:left; clear:left; width:40.5%;
  31. padding: 4.7% 4.7% 0 4.7%; margin-top: 40px; border-top: 1px dotted #d8d8d8; }
  32. .box { float:left; width: 30%; width:40.5%;
  33. padding: 4.7% 4.7% 0 4.7%; margin-top: 40px; border-top: 1px dotted #d8d8d8; }
  34.  
  35. .columns-wrapper {width: 100%; clear: none; float: left; padding: 0; margin: 0; margin-bottom: 100px; }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement