wp_query

Multiple loops are great but can wreak havoc if not used correctly. To make sure your loop runs smoothly and you can still use all of the functions that rely on globals, store the original query in a temporary variable.

[php]
$tmp_query = $wp_query;
query_posts(‘cat=5&order=ASC’);
while( have_posts() ) : the_post()
?>
<a href="<?php the_permalink() ?>’><?php the_title() ?></a><br />
<?php
$wp_query = $tmp_query;
[/php]