Advertisement
Guest User

loop.php

a guest
Apr 25th, 2012
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.47 KB | None | 0 0
  1. <div id="boxes">
  2.  
  3. <!--So lets set our category to only show fashion-->
  4. <?php query_posts($query_string . '&cat=8'); ?>
  5. <!--Start the loop-->
  6. <?php while ( have_posts() ) : the_post(); ?>
  7. <!--Inside the loop-->
  8. <div class="box">
  9.  
  10.     <!--The post title-->
  11.     <h1><?php the_title(); ?></h1>
  12.     <!--The post image-->
  13.     <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('homepage-thumb', array('alt' => '', 'title' => '')); ?></a>
  14.  
  15. </div> 
  16. <?php endwhile; ?>
  17.  
  18.  
  19. </div>
  20.  
  21. <?php rewind_posts(); ?>
  22.  
  23. <div id="boxes2">
  24. <!--So lets set our category to only show technology-->
  25. <?php query_posts($query_string . '&cat=9'); ?>
  26. <!--Start the loop-->
  27. <?php while ( have_posts() ) : the_post(); ?>
  28. <!--Inside the loop-->
  29. <div class="box">
  30.  
  31.     <!--The post title-->
  32.     <h1><?php the_title(); ?></h1>
  33.     <!--The post image-->
  34.     <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('homepage-thumb', array('alt' => '', 'title' => '')); ?></a>
  35.  
  36. </div> 
  37. <?php endwhile; ?>
  38.  
  39.  
  40. <?php rewind_posts(); ?>
  41.  
  42. <div id="boxes3">
  43. <!--So lets set our category to only show food-->
  44. <?php query_posts($query_string . '&cat=14'); ?>
  45. <!--Start the loop-->
  46. <?php while ( have_posts() ) : the_post(); ?>
  47. <!--Inside the loop-->
  48. <div class="box">
  49.  
  50.     <!--The post title-->
  51.     <h1><?php the_title(); ?></h1>
  52.     <!--The post image-->
  53.     <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('homepage-thumb', array('alt' => '', 'title' => '')); ?></a>
  54.  
  55. </div> 
  56. <?php endwhile; ?>
  57.  
  58. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement