JonathanCutrell
Member
Posted 1 year ago #
Pretty simple; I just want to set the excerpt to show only if I enter in an excerpt to show; I hate the fact that the excerpts that wordpress makes don't include pictures or links.
What is the php to make that possible?
In english,
if there is an excerpt, show the excerpt. If there isnt' an excerpt, show the content before the more tag. If there isn't a more tag, just show the content as is.
You might like advanced excerpt which allows you to change the length of excerpts and control what tags remain in the excerpt (like image tags).
As for your original question something like this should work:
<?php
if($post->post_excerpt){
the_excerpt();
else{
the_content();
}
?>
That code didn't work for me but this one did: http://wordpress.org/support/topic/149280