scriptygoddess

Archive for July, 2008

24 Jul, 2008

Show full post if there is no excerpt

Posted by: Jennifer In: Bookmarks

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 [...]


Featured Sponsors


  • Michael: You can use get_header(2) in your case. The filename of your custom header has to be header-2.php. The problem with include(your_file.php) is, all
  • cliff: hi wonder if you can help me, pls i designed www.kouga.mobi using dreamweaver CS3 and now want to make the phonenumbers into links so that if you
  • jerey: how do i rewrite this because it tried RewriteEngine on #Options +FollowSymlinks RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FIL

About


Advertisements