Unlike the_excerpt()
, which auto-generates an excerpt from the content if one does not exist, get_the_excerpt()
merely returns the contents of the post_excerpt
field.
Instead, use apply_filters( 'the_excerpt', get_the_excerpt() )
, which will trigger the same processing as the_excerpt()
, but return the output rather than echo it.