scriptygoddess

05 Jun, 2004

Optionally show excerpt

Posted by: Jennifer In: WordPress: Lessons Learned

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>";
}
?>

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

No Responses to "Optionally show excerpt"

Comments are closed.

Featured Sponsors


  • Curt: If anyone comes across this with similar issues I was able to sort out the pagination issues painlessly with easyCommentsPaginate from http://www.mush
  • Christopher: Yeah, it is indeed hard to do. And something remains elusive about why the pagination never worked. I tried everything I could find. Regardless, I
  • Jennifer: Hi Christopher, always hard to bug test stuff like that remotely. Sorry those didn't help. Glad you found a solution though :)

About


Advertisements