groups

name language licence
Auto-Resize Images Using TimThumb And WordPress Shortcodes PHP Other
Dropping in Your Own Logo PHP Other
Use More Than One Loop On A Page, Without Printing Duplicate Posts PHP Other
Get Posts With A Specific Custom Field And Specific Value PHP Other
Create A Loop Of Images PHP Other
Using Multiple Loops PHP Other

< 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 >



language: PHP
licence: Other

Using Multiple Loops

options: view full snippetsend to code collector
// First loop (get the last 3 posts in the "featured" category)
<?php query_posts('category_name=featured&showposts=3'); ?>
<?php while (have_posts()) : the_post(); ?>
  <!-- Do stuff... -->
<?php endwhile;?>

//loop reset
<?php rewind_posts(); ?>

//Second loop (Get all posts)
<?php while (have_posts()) : the_post(); ?>
  <!-- Do stuff... -->
<?php endwhile; ?>

	
(Continues...)