I am sure this has been asked before, but I can't seem to find the answer, although it seems simple enough. I have built a custom theme based on another person's design. He uses both the excerpt and the body on the archive pages (using the excerpt as a verbose subhead) and the first 20 words of post's body as the excerpt.

For this site, all posts will have a body, but not all posts will have the excerpt.

If the excerpt field is blank, I don't want an excerpt to show, unfortunately WP auto-pops the_excerpt() and get_the_excerpt() with a truncated chunk of the content.

Is there a way - in The Loop - to only show an excerpt if the actual excerpt field is populated - that is without doing yet another DB call or using custom fields?


1 Answer 1


Would the has_excerpt() function work?

The Codex says of it: Whether the current post has an excerpt.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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