I have a plugin I'm modifying in which I need to return the manual excerpt if it exists, and if not, nothing. How would I go about that? Here's my code so far:
$excerpts = sprintf(
'<a href="%1$s">Apply</a>',
esc_attr( sprintf( __( '%s' ), get_the_excerpt() ) ),
get_the_excerpt()
);
It works, but it only returns the automatically generated excerpt. Is there an argument for get_the_excerpt() to do what I want?
$post->post_excerpt
holds the manual one andthe_excerpt()
will generate it if it doesn't exist.