Does a post have an excerpt specified?

Simple way to check if your WordPress post has an excerpt specified and either show the_excerpt or the_content.

!empty($post->post_excerpt)

Example:

<?php if (!empty($post->post_excerpt)) { ?>
<?php the_excerpt(); ?>
<?php } else { ?>
<?php the_content('<p>Continue reading</p>'); } ?>

Comments are closed.