Support » Fixing WordPress » Question about the Excerpt tag

  • Mark


    Currently I am using “<?php ($post->post_excerpt) ? the_excerpt() : the_content(); ?>” in my WP theme. I have some posts that don’t have excerpts so WP is using my content for that particular post instead of using “nothing” for the excerpt.

    Is there a way to tell WP that if I don’t have an excerpt for a post that it will know NOT to post the content?

    Thanks guys/gals:)

Viewing 3 replies - 1 through 3 (of 3 total)
  • Well it seems this plugin from Kaf might help you do what you want:

    Or modify your bit of PHP to:

    <?php if(!empty($post->post_excerpt)) the_excerpt(); ?>

    This will only display an excerpt if something exists in the excerpt field of a post.

    (Not that I’m arguing against my own plugin, but sometimes it’s overkill…)



    Wonderful fellas! Thanks again:) Yeah a plugin might be a bit more than what I need and the “<?php if(!empty($post->post_excerpt)) the_excerpt(); ?>” works great!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Question about the Excerpt tag’ is closed to new replies.