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

Is there a way of hiding a blog posts text if it's longer than let's say 300 characters.

I don't want it to push the rest of the content below the fold.

You know, the show more text thing.

share|improve this question

You could use this filter which can be found in the default WordPress themes functions.php file (twentyten). This will limit the post to 300 characters, so theres no need to hide it.

function twentyten_excerpt_length( $length ) {
    return 300;
add_filter( 'excerpt_length', 'twentyten_excerpt_length' );

There are other means to achieve the same thing, but stick to whats already available and you should be fine.

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.