Replace “Excerpt More” function.

June 10, 2013

So one function in WordPress that operates very well is “the_excerpt”. If you like the way it applies it’s own character limit but don’t like what it adds at the end, this is the post for you! Lets change the excerpt more function!

So lets change the standard […] of excerpt more and make it a link to the blog post.

First open your functions.php file and add this function

function new_excerpt_more( $more ) {
     return '<a href="'. get_permalink(get_the_ID()) .'">[....]</a>';
}

This function will allow you to add the same […] from the original excerpt more function with a different content. You can put anything you like in that return.

Now lets call the function

add_filter('excerpt_more', 'new_excerpt_more');

This calls and executes your new function.

Have fun!

Stay in Touch!

Subscribe to our newsletter.

Solutions Architecture

browse through our blog articles

Blog Archive