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 Responses to "Optionally show excerpt"

Comments are closed.

Featured Sponsors

Genesis Framework for WordPress

Advertise Here


  • Scott: Just moved changed the site URL as WP's installed in a subfolder. Cookie clearance worked for me. Thanks!
  • Stephen Lareau: Hi great blog thanks. Just thought I would add that it helps to put target = like this:1-800-555-1212 and
  • Cord Blomquist: Jennifer, you may want to check out tp2wp.com, a new service my company just launched that converts TypePad and Movable Type export files into WordPre

About


Advertisements