WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am displaying the wordpress posts on the index page with:

<?php the_excerpt(); ?>

In my functions.php file I have following code:

add_filter('excerpt_length', 'my_excerpt_length');
function my_excerpt_length($length) {
return 30; }

This works fine but it shows [...] at the end of excerpt. I want to remove these [ and ] and instead I want to show only three dots ... . How can i do that? Thanks.

share|improve this question
up vote 2 down vote accepted

Use the excerpt_more filter hook:

function mytheme_excerpt_more( $text ) {
    $text = '...';
    return $text;
add_filter( 'excerpt_more', 'mytheme_excerpt_more' );
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.