DISCLAIMER: this post is older than one year and may not be up to date with latest WordPress version.

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? Just read on.

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');

And you’re done! Goodbye […] :)

By the way, I recently started a contest on Cats Who Code, where you can win premium WordPress themes. Sounds good to you? Click here to join.


  1. If i paste the above code in the functions.php its not removing […] excerpt, still i can see the excerpt on home page can you please help me on this

  2. Nikita Mishra

    This code is not working for me :(

  3. Not really working :(

  4. Works Great Thanks for the quick tip :)

  5. Not working for me either.

  6. Looks like this may not work anymore. This replaces them with a straightfoward ellipsis:

    function plain_ellipsis($more) {
    return ‘…’;

    add_filter(‘excerpt_more’, ‘plain_ellipsis’);

    – simple, eh?

Leave a Comment

Your email address will not be published. Required fields are marked *