Answering my own question. Solved with an if else statement using has_excerpt.
if( has_excerpt ( $_post, ID ) ) {
$author = sprintf( '<a href="https://wordpress.stackexchange.com/questions/224893/%1$s">Apply</a>', esc_attr( get_the_excerpt( $_post ) ) );
} else {
$author="";
}
It only makes sense, really.
Related Posts:
- Remove more or […] text from short post
- How can i limit the character length in excerpt? [duplicate]
- How to include line-breaks in the_excerpt?
- How to control manual excerpt length?
- excerpt in characters
- Remove Ellipses from Excerpt
- Custom excerpt length on home page
- the_excerpt() or get_the_excerpt with shortcode escape
- Modify Twenty Fourteen Home Page Content Limit & Add Read More Link
- Custom Excerpt is returning 52 characters and not 52 words
- Disable WYSIWYG rich text editor only on post excerpt
- How do I disable excerpts on blogs and website
- How to remove “Read on” content in the_excerpt?
- excerpt_length not working
- Read more does not show up when I write my own Excerpt
- can hyperlinks be displayed in excerpts?
- Making oEmbed work on the excerpt field
- Read More for Excerpt not working
- Twenty Fourteen: Change Read More text
- Read more on the post page itself
- wp_trim_words is trimming by character instead of by words
- adjust the_excerpt based on template page
- First letter cutting off in excerpt
- How to display links in excerpt? [duplicate]
- Getting the_excerpt to link to child pages [closed]
- Excerpt – add the last few words of posts to the […]
- excerpt – don’t use main content if empty
- Any way to get more space for editing post excerpts
- Show validation warning if no Excerpt is added
- Remove box character after excerpts. Special Character Bug
- Include post title in readmore link?
- Excerpt using Read More Tag
- Gutenberg is Adding Additional HTML Tags When Grabbing the Excerpt
- How to show post content before read more tag (excerpt) for password protected posts?
- Excerpt_length nor the_excerpt not working correctly
- How to remove first three words from content and display the excerpt
- Why is my excerpts not showing if not explicitly declared?
- How to get the nivo slider to show excerpt [closed]
- Add “Excerpt” in “Quick edit”
- Removing h3s in excerpt output?
- How to wrap “Read More” link in a DIV tag?
- Automatic excerpts
- how to get excerpt without p html tag from wordpress post
- the_excerpt not displaying
- excerpt display same text
- Problem with viewing single page correctly. (taken half way down the page on click through)
- get video from content
- Show image in excerpt post. Image not displaying
- the_excerpt() and tag
- Post excerpt in custom meta box… help with proper php format
- PHP Code in excerpt?
- Use get_the_excerpt is returning nothing outside of loop
- Limiting the number of characters in the except
- Private Post BUT Public excerpt on Homepage
- Replacing the ellipsis with three dots
- The Excerpt gets page excerpt instead of most recent post excerpt
- Make only the image an anchor link using the advanced excerpt plugin?
- Why archive page can’t show full content?
- Manual excerpt length on recent posts slider
- Remove ‘read more’ link when post is shorter than excerpt
- truncate post with gallery tag
- Removing the […] from the excerpt returned by get_the_excerpt() only in some places
- Excerpt not alway available
- Continuum Theme – Excerpt length
- Prevent Advanced Excerpt from Being Called
- What’s the internal concatenation function for creating Excerpts with WordPress?
- “Continue reading” not on some posts, full excerpts not shown
- Get the automatic excerpt from a page created with gutenberg
- Read More excerpt link on a post is not linking to the post itself
- Relia Theme Homepage Articles Excerpt displays the current page excerpt not the posts being pulled
- get_the_excerpt only returns one excerpt
- How to extract an excerpt from a specific page?
- Display Full Content Instead of Excerpt
- How to use limit post content on archive page in WordPress?
- Remove Default Read More Link in Manual Excerpt RSS Feed
- How to custom excerpt?
- “read more” tag for excerpt() won’t show full content
- Unable to show excerpts
- modify text at the bottom of excerpt editor
- excerpt button not going to custom post page
- Excerpt preview
- Excerpt “Read More” link
- Force authors to use Manual Excerpt in WordPress and multiple Manual Excerpts
- Manual excerpt being ignored on custom post type
- Remove “[ ]” from excerpt in highlight search term
- Trimming breaks up markup
- WordPress excerpt with formatting and allowing selected tags
- multiple excerpt length and styles
- How to display page excerpt with readmore link inside an enhanced widget?
- how to use the_excerpt for two post queries?
- Excerpt Problems
- Function to shorten string without cutting off last word
- Implementing a blog excerpt in custom theme
- Get the excerpt of post_content
- Get a raw value of excerpt
- Excerpt length and alignment [duplicate]
- Export Posts in excel [closed]
- Opening file, editing, save, exit, open, edited version opens?
- Is there a way to display the ‘Read more’ link if it’s within a range?
- HTML in excerpt WordPress 6.2.2