How to Append to the_excerpt() Function

function custom_excerpt_more( $more ) {
    return '...'; // <-- your end string
}
add_filter( 'excerpt_more', 'custom_excerpt_more' );

http://codex.wordpress.org/Plugin_API/Filter_Reference/excerpt_more


The above solution is the preferred, but to make this work:

<p class="extra"><?php the_excerpt() . $more; ?></p>

Change it to:

<p class="extra"><?php the_excerpt(); echo $more; ?></p>

Leave a Comment