Return to Snippet

Revision: 26050
at April 17, 2010 08:10 by vagrantradio


Initial Code
<?php $temp = $wp_query;
$wp_query= null;
$wp_query = new WP_Query();
$wp_query?>query('showposts=5&category_name=thecategoryname'.'&paged='.$paged);
?>
<?php while ($wp_query?>have_posts()) : $wp_query->the_post(); ?>
    <?php the_content(); ?>
<?php endwhile; ?>

<div class="navigation">
  <div class="alignleft"><?php previous_posts_link('&laquo; Previous') ?></div>
  <div class="alignright"><?php next_posts_link('More &raquo;') ?></div>
</div>
<?php $wp_query = null; $wp_query = $temp;?>

Initial URL

                                

Initial Description

                                

Initial Title
WordPress paginated wp_query

Initial Tags
php, wordpress, query

Initial Language
PHP