title: get_the_content not working within shortcode
body: <p>I have an issue with a shortcode that I'm writing for wordpress. I'm trying to use the <code>get_the_content()</code> function but instead of pulling the contents of the custom post type I've created it's pulling the contents of the page the shortcode is sitting on. Other functions are all working fine e.g. <code>get_the_title()</code> and g<code>et_the_post_thumbnail()</code>. I pass the ID in the functions and it works great for everything else, just not <code>get_the_content</code>. </p>
  
  <pre><code>get_the_content($testimonial_item-&gt;ID);
  </code></pre>
  
  <p>The shortcode contains pagination and other elements which all work correctly, It's just this one function that causing me grief. The full code is below, any help would be greatly appreciated.</p>
  
  <pre><code>function ncweb_display_testimonial_items($atts, $content = null) {
  
  extract( shortcode_atts( array(
      'per_page' =&gt; 6
  ), $atts ) );
  
  /* pagination parameters */
  
  // check what page we are on
  if ( isset ($_GET['testimonial-page'] ) ) $page = $_GET['testimonial-page']; else $page = 1;
  
  // default number of pages
  $total_pages = 1;
  
  // portfolio offset. Used in the get_posts() query to show only portfolio for the current page
  $offset = $per_page * ($page-1);
  
  // setup the portfolio args for retrieving the total number of portfolio items
  $testimonial_count_args = array(
      'post_type' =&gt; 'ncweb-testimonials',
      'posts_per_page' =&gt; -1
  );
  $testimonial_count = count(get_posts($testimonial_count_args));
  
  // calculate the total number of pages
  $total_pages = ceil($testimonial_count/$per_page);
  
  /* end pagination parameters */
  
  // main image query
  $testimonial_args = array(
      'post_type' =&gt; 'ncweb-testimonials',
      'numberposts' =&gt; $per_page,
      'offset' =&gt; $offset
  );
  
  $testimonial_items = get_posts($testimonial_args);
  
  // start our output buffer
  ob_start();
  
  if($testimonial_items) :
  
      /*** main portfolio loop ***/
  
          $counter = 1;
          echo '&lt;div class="testimonial-items" id="testimonial-items"&gt;';
  
          foreach($testimonial_items as $testimonial_item) :
  
          $testimonial_company = get_post_meta($testimonial_item-&gt;ID, 'ncweb_testimonial_company', true);
          $testimonial_client = get_post_meta($testimonial_item-&gt;ID, 'ncweb_testimonial_client_name', true);
  
          echo '&lt;aside class="testimonial-list-item row"&gt;';
          echo '&lt;div class="col-xs-12 testimonial-list-item-info"&gt;';
          echo '&lt;div class="testimonial-image"&gt;'. get_the_post_thumbnail($testimonial_item-&gt;ID) .'&lt;/div&gt;';
          echo '&lt;div class="testimonial-client"&gt;&lt;span class="testimonial-client-name"&gt;'. $testimonial_client .'&lt;/span&gt;&lt;br/&gt;&lt;span class="testimonial-company"&gt;'. $testimonial_company .'&lt;/span&gt;&lt;/div&gt;';
          echo '&lt;/div&gt;'; //end of testimonial-list-item-info
          echo '&lt;div class="col-xs-12 testimonial-item-content"&gt;'. get_the_content($testimonial_item-&gt;ID); .'&lt;/div&gt;';
          echo '&lt;/aside&gt;';
  
          $counter++;
  
          endforeach;
          echo '&lt;/div&gt;';
  
          /*** display pagination ***/
  
          // pagination base
          echo '&lt;div id="testimonial-pagination"&gt;';
  
              $base = get_permalink(get_the_ID()) . '%_%';
  
              echo paginate_links( array(
                  'base' =&gt; $base,
                  'format' =&gt; '?testimonial-page=%#%',
                  'prev_text' =&gt; __('Previous', 'ncweb'),
                  'next_text' =&gt; __('Next', 'ncweb'),
                  'total' =&gt; $total_pages,
                  'current' =&gt; $page,
                  'end_size' =&gt; 1,
                  'mid_size' =&gt; 5
              ));
  
          echo '&lt;/div&gt;';
  
      /*** end pagination display ***/
  
  
  else :
      echo '&lt;p&gt;' . __('No testimonial items found.', 'ncweb') . '&lt;/p&gt;';
  endif; // end if($images)
  
  return ob_get_clean();
  
  }
  add_shortcode( 'testimonial-items', 'ncweb_display_testimonial_items' );
  </code></pre>