title: Wordpress get_posts() fetch next batch of posts
body: <p>I'm using the get_posts() function to fetch a batch of posts from a custom post type, sorted by ID, modify those posts and then fetch the next batch.</p>
  
  <p>I have the following code:</p>
  
  <pre><code>&lt;?php
  require_once('wp-load.php');
  $temp_list_of_products_array        = get_posts( array('post_type' =&gt; 'sale', 'numberposts' =&gt; 10 ) );
  $temp_list_of_products_array_length = count( $temp_list_of_products_array );
  
  for ($xt = 0; $xt &lt; $temp_list_of_products_array_length; $xt++) {
      $temp_product_id                    = $temp_list_of_products_array[$xt]-&gt;ID;
      $temp_product_untranslated_field    = get_post_meta($temp_product_id, 'wpcf-product-details', true);
      $temp_product_translated_field      = get_post_meta($temp_product_id, 'wpcf-translated-product-details', true);
      $temp_product_description_language  = 'en';
  
      if ($temp_product_translated_field == null) {
          $temp_product_translated_contents   = google_translate_text($temp_product_untranslated_field, $temp_product_description_language);
          update_post_meta($temp_product_id, 'wpcf-translated-product-details', $temp_product_translated_contents);
      } 
      echo $temp_product_id;
  }
  ?&gt;
  </code></pre>
  
  <p>This works great but the problem is that it only loads the first 10 posts ordered by date.</p>
  
  <p>My question is, how do I get the next batch of 10 posts without have a user activated pagination call?</p>
  
  <p>Thanks</p>