title: Multisite wordpress search loop and pagination?
body: <p>OK I have a wordpress custom loop looping across 3 blogs and returning the results like so: </p>
  
  <pre><code>&lt;?php
                   $posts_per_page = get_option('posts_per_page');
                   $searchfor = get_search_query(); // Get the search query for display in a headline
                   $query_string=esc_attr($query_string); // Escaping search queries to eliminate potential MySQL-injections
                   $blogs = get_blog_list( 0,'all' );
                   $notfound = true;
                   $current_blogid=get_current_blog_id();
                   $blogs_ordered = array($current_blogid);
  
          foreach ( $blogs as $blog ):
                  if ($blog['blog_id']!=$blogs_ordered['0']){
                          $blogs_ordered[]=$blog['blog_id'];
                  }
          endforeach;
  
          foreach ( $blogs_ordered as $blogid ):
                  switch_to_blog($blogid);
                 $paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;
                                $search = new WP_Query($query_string.'&amp;posts_per_page=1&amp;paged='.$paged);               
  
                    if ($search-&gt;found_posts&gt;0) {
                           foreach ( $search-&gt;posts as $post ) {
  
                               POST CONTENT ECHOS HERE!!!
  
                                  &lt;?php
                                  $post = $postx;
                                  wp_reset_query();
                              }
                          }
                       wp_reset_query();
  
          endforeach;
             $page_links_total =  $search-&gt;max_num_pages; 
                  if ($page_links_total&gt;1) :
  
  
                  ?&gt;
  
          &lt;div class="navigation"&gt;
              &lt;div class="nav"&gt;
                          &lt;?
  
      $search-&gt;query_vars['paged'] &gt; 1 ? $current = $search-&gt;query_vars['paged'] : $current = 1;
      $pagination_args = array(
          'base' =&gt; @add_query_arg('paged','%#%'),
          'format' =&gt; '',
          'total' =&gt; $page_links_total,
          'current' =&gt; $current,
          'show_all' =&gt; false,
          'end_size' =&gt; 0,
          'mid_size' =&gt; 0,
      );
      if ( $wp_rewrite-&gt;using_permalinks() ) $pagination['base'] = user_trailingslashit( trailingslashit( remove_query_arg( 's', get_pagenum_link( 1 ) ) ) . 'paged/%#%/', 'paged' );
      if ( !empty($wp_query-&gt;query_vars['s']) ) $pagination['add_args'] = array( 's' =&gt; get_query_var( 's' ) );  
  
      $prev = get_previous_posts_link('&lt; FORRIGE');
      $next = get_next_posts_link('NESTE &gt;');
  
  $links = paginate_links($pagination_args);
      $links = "
              &lt;div class='left'&gt;
                  $prev    
              &lt;/div&gt;
              &lt;div class='class'&gt; 
                  $next
              &lt;/div&gt;
      ". $links;
      echo $links;
              ?&gt;
              &lt;/div&gt;
              &lt;/div&gt;
  
          &lt;div class="navigation"&gt;
  
              &lt;div class="nav"&gt;
                  &lt;div class="left"&gt;
                          &lt;a href="&lt;?php echo get_site_url(1) . "/?s=" . get_search_query() . '&amp;paged=' . ($current - 1); ?&gt;"&gt;&lt; FORRIGE&lt;/a&gt;
                  &lt;/div&gt;
              &lt;div class='center'&gt;Side &lt;?php echo "$current/$page_links_total"; ?&gt;&lt;/div&gt; 
                  &lt;div class="right"&gt;
                          &lt;a href="&lt;?php echo get_bloginfo('home') . "/page/" . ($current + 1) . "/"; ?&gt;"&gt;NESTE &gt;&lt;/a&gt;
                          &lt;?php echo the_search_query(); ?&gt;
                          &lt;a href="&lt;?php echo get_site_url(1) . "/?s=" . the_search_query() . '&amp;paged=' . ($current + 1); ?&gt;"&gt;NESTE &gt;&lt;/a&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;?php
          endif; 
  ?&gt;
  </code></pre>
  
  <p>My problem arrises that whenever i try and use the pagination links it just refreshes the same page. if i change this: </p>
  
  <pre><code> $search = new WP_Query($query_string.'&amp;posts_per_page=1&amp;paged='.$paged);
  </code></pre>
  
  <p>to : </p>
  
  <pre><code>  $search = new WP_Query($query_string.'&amp;posts_per_page=1&amp;paged=10');   
  </code></pre>
  
  <p>it does jump to the right page and the next prev links just refuse to work, i've tried turning off permalinks I've tried a myraid of different things (some still in the code..) 
  Please help this is driving me up the wall!
  Kind regards
  Chris</p>