wordpress snippets last updated   : October 6, 2014
we now have 641 snippets

No excerpt available, display default message

wordpress snippet

Adding this snippet to your wordpress theme will allow you to display a default message when no excerpt has been added.

snippet :  PHPcopy
$excerpt = get_the_excerpt();
if ( empty($excerpt) ) {
	echo "no excerpt for this posting.";
}
echo $excerpt;

Did you like this post? If so please share it with your friends. Thanks!