• OK, stupid noob question here, but I’d like to figure out the most elegant way to do this …

    My site uses the excerpt field to associate an external URL with each post. At the end of the post, the reader gets a send-off to the source material, via the excerpt:

    <a href="<?php the_excerpt_rss(); ?>" target=_blank>Read the whole thing here.</a>

    Except now, we’re beginning to do posts that don’t go to an external link, and that means there won’t be an excerpt. So what’s the cleanest, neatest way to only display the above link if the excerpt has any content, and skip it if it is empty?

  • The topic ‘Showing the excerpt only if there is an excerpt’ is closed to new replies.