I have the following code:

<?php
/*
Template Name: blog
*/
?>
  <?php get_header(); ?>
  <div id="blog">
    <div class="content">
      <?php query_posts('cat=-4,-11');?>
      <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
        <div class="post">
          <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
          <span class="date"><?php the_time('F jS, Y'); ?></span>
          <div class="body">
            <?php the_content(''); ?>
          </div>
          <span class="info">posted by: <?php the_author(); ?> in <?php the_category(', '); ?> | <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></span>
        </div>
      <?php endwhile; endif; ?>
      <?php posts_nav_link(' &#183; ', '&laquo; previous page  ', ' <br />next page &raquo; '); ?>
    </div>      
    <?php get_sidebar(); ?>     
  </div>
  <?php get_footer(); ?>

The page navigation is only needed in this template.

link|improve this question

56% accept rate
feedback

1 Answer

up vote 2 down vote accepted

You would need to account for pagination in your query.... something like:

<?php query_posts( array(  
      'cat' => '-4,-11', 
      'paged' => ( get_query_var('paged') ? get_query_var('paged') : 1 ), 
 )); 
?>

http://www.rvoodoo.com/projects/wordpress/wordpress-tip-fixing-pagination-on-custom-queries-with-query_posts/

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.