As the title said – needed to show the excerpt if there was one, or the *full* post if there wasn't (not the shortened version wordpress "fakes")
remove_filter('get_the_excerpt', 'wp_trim_excerpt');
if (get_the_excerpt() == "") {
echo apply_filters('the_content',get_the_content());
} else {
echo apply_filters('the_content',get_the_excerpt());
echo '<p><a href="'.get_permalink().'">Read more...</a></p>';
}
Updated 8/11/08 Made some changes to the code. Excerpts were coming in unformatted, also removed some extra stuff I don't think I needed in there…
Related posts:
- Striping IMG tags from the_content in WordPress (and how to fudge page excerpts) Background: For a site I was working on, I was...
- Adding a block of HTML to a WordPress post One problem with the WYSIWYG editor in WordPress is that...
Related posts brought to you by Yet Another Related Posts Plugin.
scriptygoddess
