How to show WordPress featured image caption without a plugin

This WordPress snippet will allow you to show the image caption for the featured image in your WordPress posts without using a plugin.

Instructions
Add this code your theme files (ie. single.php) where you are displaying the image.
ur image.

*you can replace post_excerpt with post_content to get the image description etc.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Snippet Info

Tested with Wordpress v. 4.9.5
Last Modified: 24.11.2018
Last Reviewed: 24.11.2018

How to show WordPress featured image caption without a plugin
4 (80%) 2 votes
Please report broken snippets.
Report Broken Snippet
WP Engine