Advertisement
Guest User

Display multiple posts from categories Wordpress

a guest
Apr 14th, 2011
838
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. <h2>Aanbiedingen Vorden</h2>
  2. <?php $recent = new WP_Query(); ?>
  3. <?php $recent->query('cat=4&showposts=100'); ?>
  4. <?php while($recent->have_posts()) : $recent->the_post(); ?>
  5. <ul>
  6. <li>
  7. <a href="<?php the_permalink(); ?>">
  8. <?php the_title(); ?></a><br>
  9. <?php the_content(); ?>
  10. </li>
  11. </ul>
  12. <?php endwhile; ?>
  13.  
  14. <h2>Aanbiedingen Hengelo</h2>
  15. <?php $recent = new WP_Query(); ?>
  16. <?php $recent->query('cat=5&showposts=5'); ?>
  17. <?php while($recent->have_posts()) : $recent->the_post(); ?>
  18. <ul>
  19. <li>
  20. <a href="<?php the_permalink(); ?>">
  21. <?php the_title(); ?></a><br>
  22. <?php the_content(); ?>
  23. </li>
  24. </ul>
  25. <?php endwhile; ?>
  26.  
  27. <h2>Aanbiedingen Zelhem</h2>
  28. <?php $recent = new WP_Query(); ?>
  29. <?php $recent->query('cat=6&showposts=5'); ?>
  30. <?php while($recent->have_posts()) : $recent->the_post(); ?>
  31. <ul>
  32. <li>
  33. <a href="<?php the_permalink(); ?>">
  34. <?php the_title(); ?></a><br>
  35. <?php the_content(); ?>
  36. </li>
  37. </ul>
  38. <?php endwhile; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement