WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

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 wish I knew PHP as well as I do Rails. I'd imagine this is fairly intuitive.


share|improve this question
up vote 1 down vote accepted

Wordpress has an inbuilt function called the_excerpt() which echoes an excerpt of the post content.

By default an excerpt is 55 characters. You can set it to 200 like so:

function your_excerpt_length( $length ) {
    return 200;
add_filter( 'excerpt_length', 'your_excerpt_length' );

This should go into your theme's functions.php, ideally.

EDIT: To manipulate the excerpt more string, use the following:

function your_excerpt_more($more) {
    return '';
add_filter('excerpt_more', 'your_excerpt_more');

Given that you commented that the_excerpt() does not output the native [...], it is likely your theme already makes use of that filter somewhere else to replace the normal output with the described "… Continue reading →" link. So rather than adding it again, find that in your theme.

share|improve this answer
Anyway to get rid of the "read more" ? I already have a button for that. – Trip Nov 15 '11 at 15:43
@Trip the_excerpt() should display [...] at the end, but not "read more". What is the exact string it outputs after the 200 characters? I will update my answer accordingly. – Johannes Pille Nov 15 '11 at 15:49
It gives me a … Continue reading → But I don't need those because I already made a button. – Trip Nov 15 '11 at 15:52
Ah I didn't realize the themes had their own custom functions as well. Thanks so much Johannes! – Trip Nov 15 '11 at 15:58

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.