title: wordpress pagination doesn't show
body: <p>******EDIT*******</p>
  
  <p>This is now my code for posts:</p>
  
  <pre><code>&lt;?php
  if ( get_query_var('paged') ) { $paged = get_query_var('paged'); }
  elseif ( get_query_var('page') ) { $paged = get_query_var('page'); }
  else { $paged = 1; }
  query_posts('posts_per_page=3&amp;paged=' . $paged);
    $args = array (
      'posts_per_page' =&gt; 3,
      $offset = $paged*$pages,
      'post_type' =&gt; array('post','project'),
      'meta_key' =&gt; '_thumbnail_id'
    );
  </code></pre>
  
  <p>The navigation with numbers show, and he goes to page/2 but the new posts didn't show.</p>
  
  <hr>
  
  <p>I build an local Wordpress website for an test. I add pagination in Wordpress. But the Pagination don't show up. This is my code:</p>
  
  <pre><code> $paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;
    $args = array (
      'posts_per_page' =&gt; 3,
      'offset' =&gt; 0,
      'post_type' =&gt; array('post','project'),
      'meta_key' =&gt; '_thumbnail_id',
      'paged' =&gt; $paged
    )
  
    $home_recent = new WP_Query( $args );
    if( $home_recent -&gt;have_posts() ) :
    while( $home_recent -&gt;have_posts() ) :
    $home_recent -&gt;the_post();
    $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post-&gt;ID ), 'full' ); 
    $post_type = get_post_type( $post-&gt;ID ); ?&gt;
  </code></pre>
  
  <p>This if for get posts.</p>
  
  <p>This my function:</p>
  
  <pre><code> function pagination($pages = '', $range = 4)
   {  
   $showitems = ($range * 2)+1;  
  
   global $paged;
   if(empty($paged)) $paged = 1;
  
   if($pages == '')
   {
       global $wp_query;
       $pages = $wp_query-&gt;max_num_pages;
       if(!$pages)
       {
           $pages = 1;
       }
   }   
  
   if(1 != $pages)
   {
       echo "&lt;div class=\"pagination\"&gt;&lt;span&gt;Page ".$paged." of ".$pages."&lt;/span&gt;";
       if($paged &gt; 2 &amp;&amp; $paged &gt; $range+1 &amp;&amp; $showitems &lt; $pages) echo "&lt;a href='".get_pagenum_link(1)."'&gt;&amp;laquo; First&lt;/a&gt;";
       if($paged &gt; 1 &amp;&amp; $showitems &lt; $pages) echo "&lt;a href='".get_pagenum_link($paged - 1)."'&gt;&amp;lsaquo; Previous&lt;/a&gt;";
  
       for ($i=1; $i &lt;= $pages; $i++)
       {
           if (1 != $pages &amp;&amp;( !($i &gt;= $paged+$range+1 || $i &lt;= $paged-$range-1) || $pages &lt;= $showitems ))
           {
               echo ($paged == $i)? "&lt;span class=\"current\"&gt;".$i."&lt;/span&gt;":"&lt;a href='".get_pagenum_link($i)."' class=\"inactive\"&gt;".$i."&lt;/a&gt;";
           }
       }
  
       if ($paged &lt; $pages &amp;&amp; $showitems &lt; $pages) echo "&lt;a href=\"".get_pagenum_link($paged + 1)."\"&gt;Next &amp;rsaquo;&lt;/a&gt;";  
       if ($paged &lt; $pages-1 &amp;&amp;  $paged+$range-1 &lt; $pages &amp;&amp; $showitems &lt; $pages) echo "&lt;a href='".get_pagenum_link($pages)."'&gt;Last &amp;raquo;&lt;/a&gt;";
       echo "&lt;/div&gt;\n";
   }
    }
  </code></pre>
  
  <p>And this for show the pagination:</p>
  
  <pre><code>  &lt;?php }
    endwhile;
    if (function_exists("pagination")) {
    pagination($additional_loop-&gt;max_num_pages);
    } 
  
    endif; wp_reset_postdata(); ?&gt;
  </code></pre>
  
  <p>Butt It shows nothing only the three posts. Is this code wrong or miss I things?</p>
  
  <p>Julian</p>