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

So I enabled custom excerpts on my pages with this function.

add_action('init', 'page_excerpts');

function page_excerpts() {
    add_post_type_support( 'page', 'excerpt' );

However, When I enter a data into the excerpt field I still have the content returning in the loop instead of my newly added excerpt.

<?php the_excerpt(); ?>

Do I need to do anything else to force the content to be pulled from the excerpt field on pages?

share|improve this question
up vote 2 down vote accepted

Perhaps try this:

    global $more; 
    $more = false; 
 <?php the_content('<span>Continue Reading</span>'); ?>
 <?php $more = true; ?>
share|improve this answer
That seemed to give me a the full content instead of the excerpt. – Zach Shallbetter May 20 '11 at 15:58
Oh, sorry, I didn't get that completely right. <?php global $more; $more = false; ?> <?php if (!empty($post->post_excerpt)) : ?> <?php the_excerpt(''); ?> <?php else : ?> <?php the_content('<span>Continue Reading</span>'); ?> <?php endif; ?> <?php $more = true; ?> – Pippin May 20 '11 at 16:23
lol, so if it has the excerpt it pulls the excerpt from the content and if it doesn't have an excerpt it pulls ALL of the content images and all. Still not pulling from the excerpt box. – Zach Shallbetter May 20 '11 at 16:54
Instead of using the_excerpt(), try echo $post->post_excerpt; – Pippin May 20 '11 at 19:24
Awesome! Worked great – Zach Shallbetter May 20 '11 at 23:30

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.