11 Apr 2018
Echo WordPress Featured Image Description
On blog post single.php in WordPress TwentySeventeen, echo the Featured Image Description with photo credit just before the comments’ If statement.
Remove “photo credit” from the text (not case sensitive), then add it formatted as wanted (update: bug in the code below caused post content to show again if no featured image was attached to the post, not fixed here):
Just show everything and emphasize output:
Place the photo credit link to photo page only in Featured Image Description with no spaces surrounding it, then have the code below make it into a link that opens in a new window/tab:
A small change to the previous code, show the link as the text:
Originally published on October 24, 2017. Updated on April 11, 2018.