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 thoughts on “WordPress display excerpt if not empty”

Leave a Comment