You know when using the_excerpt()
and no "excerpt" is set on a post it automatically uses the first 50 words or so.
Is the same also possible when using get_the_excerpt()
For instance I'm using get_the_excerpt()
like this …
$return .= sprintf('
<li>
<div class="title"><a href="%1$s">%2$s</a><span class="goto">a</span></div>
<div class="project-description">%3$s</div>
</li>',
get_permalink( get_the_ID() ),
get_the_title(),
get_the_excerpt()
);
However if no excerpt is set, the get_the_excerpt()
function doesn't show a fallback (the first 50 or so words). Any idea how to make that work?