wordpress snippets last updated   : January 29, 2015
we now have 646 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!