title: My custom get_the_excerpt() can't get excerpt by ID
body: <p>On my single.php page I am trying to create a function to give me a custom length excerpt of a specific post by ID.</p>
  
  <p>Below are my two functions I am running.</p>
  
  <pre><code>/* Custom get_the_excerpt to allow getting Post excerpt by ID */
  function custom_get_the_excerpt($post_id) {
    global $post;
    $save_post = $post;
    $post = get_post($post_id);
    $output = get_the_excerpt($post);
    $post = $save_post;
    return $output;
  }
  
  /* Change Excerpt length */
  function excerpt($num, $post_id = '') {
      $limit = $num+1;
      $excerpt = explode(' ', custom_get_the_excerpt($post_id), $limit);
      array_pop($excerpt);
      $excerpt = implode(" ",$excerpt)."&amp;#8230";
      echo $excerpt;
  }
  </code></pre>
  
  <p>What I'm using to call the function.</p>
  
  <pre><code>&lt;?php $previous = get_previous_post();
  echo excerpt('30', $previous -&gt; ID); ?&gt;
  </code></pre>
  
  <p>The issue I am running into is $post is giving me the previous post information however when I pass that into get_the_excerpt it returns the current post excerpt rather than the previous post excerpt.</p>
  
  <p>EDIT</p>
  
  <p>Changed function to this after several people told me I can just pass the $post_id to get_the_excerpt()</p>
  
  <pre><code>/* Change Excerpt length */
  function excerpt($num, $post_id = '') {
      $limit = $num+1;
      $excerpt = explode(' ', get_the_excerpt($post_id), $limit);
      array_pop($excerpt);
      $excerpt = implode(" ",$excerpt)."&amp;#8230";
      echo $excerpt;
  }
  </code></pre>
  
  <p>Still no change.</p>