title: Wordpress numbered Pagination & updating the current page using query_posts
body: <p>I can add numbered pagination to wordpress fine, the problem is when I click on page two the link for page one doesn't appear to be clickable. The loop still thinks it's on page one.</p>
  
  <p>This is my current code.</p>
  
  <pre><code>&lt;?php query_posts('posts_per_page=5'); ?&gt;
  
  &lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&gt;
  
   ....
  
  
  &lt;?php endwhile; 
  
  endif; ?&gt;
  
    &lt;?php
  global $wp_query;
  
  $big = 999999999; // need an unlikely integer
  
   echo paginate_links( array(
   'base' =&gt; str_replace( $big, '%#%', esc_url( get_pagenum_link( $big )         )  ),
   'format' =&gt; '?paged=%#%',
    'current' =&gt; max( 1, get_query_var('paged') ),
    'total' =&gt; $wp_query-&gt;max_num_pages
   ) );
   ?&gt;
  </code></pre>