title: Pagination problem in WordPress
body: <p>For some reason the pagination is not working here, and I can't figure out why.  </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;
  
      $post_type = 'portfolio';
      $tax = 'type';
      $tax_terms = get_terms($tax);
  
      ?&gt;
  
      &lt;?php 
  
      //print_r($tax_terms);
      if ($tax_terms) {
      foreach ($tax_terms as $tax_term) {
  
      $args = array (
  
          'post_type' =&gt; $post_type,
          "$tax" =&gt; $tax_term-&gt;slug,
          'post_status' =&gt; 'publish',
          'posts_per_page' =&gt; 2,
          'caller_get_posts'=&gt; 1,
          'paged' =&gt; $paged 
  
          );  
  
  
      $my_query = new WP_Query($args);
  
  
      ?&gt;
  
      &lt;?php if ( $my_query-&gt;have_posts () ) { ?&gt;
  
      &lt;?php while ( $my_query-&gt;have_posts () ) : $my_query-&gt;the_post(); $count++; global $post;  ?&gt;
  
      &lt;?php include (TEMPLATEPATH . '/_framework/includes/portContent.php'); ?&gt;      
  
      &lt;?php endwhile;?&gt;
  
      &lt;?php }  ?&gt;
  
      &lt;?php }  ?&gt;
  
      &lt;?php }  ?&gt;
  
     &lt;?php if (function_exists("pagination")) {
      pagination($additional_loop-&gt;max_num_pages);
      } ?&gt;
  </code></pre>
  
  <p>Any ideas?</p>