Optionally show excerpt

There may be another way to do this, but I wanted to show the excerpt, but only if I had actually typed something in. Just doing the following, will show part of the post if there’s no excerpt (maybe I was doing it wrong?):

<?php the_excerpt(); ?>

In any case, I use the “excerpt” field for “Guest author” information. So I have it only display when there IS guest author information by doing the following:

<?php if ($post->post_excerpt != “” ) {
echo “<p><b>”.$post->post_excerpt.”</b></p>”;
}
?>

Comments are closed.