Custom Excerpt Length

<?php
// allow custom excerpt lengths
function wd_excerpt( $limit ) {

     $excerpt = explode( ' ', get_the_excerpt(), $limit );

     if ( count( $excerpt ) >= $limit ) {
          array_pop( $excerpt );
          $excerpt = implode( " ", $excerpt ) . '...';
     } else {
          $excerpt = implode( " ", $excerpt );
     }

     $excerpt = preg_replace( '`\[[^\]]*\]`', '', $excerpt );

     return $excerpt;
}

Usage

<?php echo wd_excerpt(20); ?>