WordPress display excerpt if not empty

Display excerpt only if it is not empty:

<?php
if ( has_excerpt( get_the_id() ) ){
	echo get_the_excerpt();
}
?>

2 comments on “WordPress display excerpt if not empty

Leave a Reply

Your email address will not be published. Required fields are marked *