Remove the suffix dot from the excerpt

March 14, 2009 · Print This Article

Did you ever wondered why the the_excerpt() function always display […] at the end of the post excerpt? To be honest, I don’t find this very beautiful. So, what about remove it?

To get rid of the […] at the end of the post excerpt, simply paste the following function in the functions.php file from your theme:

function trim_excerpt($text) {
return rtrim($text,'[...]');
add_filter('get_the_excerpt', 'trim_excerpt');

Your choice for site templates and wordpress themes


One Response to “Remove the suffix dot from the excerpt”

  1. Wordpress Tip : How To Remove/Replace Dot Suffix From The Excerpt | Ganda Manurung on August 11th, 2009 3:02 pm

    […] is dirty. It is better without the […] suffix. Then, I try to remove the suffix and I find great reference to do […]

Got something to say?

You must be logged in to post a comment.