title: How do I display a title excerpt in next post link wordpress
body: <p>I am having problems displaying a title excerpt on a next post link. </p>
  
  <p>If the characters are more than 30 for the next posts title i would just like it to show '...'</p>
  
  <p>This is the code I use for title excerpts</p>
  
  <pre><code> &lt;?php short_title('...', 25); ?&gt;
  </code></pre>
  
  <p>And this is the code I use for next post links</p>
  
  <pre><code> &lt;?php next_post_link( '&lt;span class="pn-a"&gt;%link&lt;/span&gt;', '&lt;span class="pn-a"&gt;%title&lt;/span&gt;' ) ?&gt;
  </code></pre>
  
  <p>Short Title Function</p>
  
  <pre><code>function short_title($after = '', $length) {
  $mytitle = get_the_title();
  if ( strlen($mytitle) &gt; $length ) {
  $mytitle = substr($mytitle,0,$length);
  echo $mytitle . $after;
  } else {
  echo $mytitle;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>Any help?</p>
  
  <p>Thanks</p>