I\'m trying to get the captions from images in Wordpress but I can\'t find an easy function to grab this bit of information.
Anyone know a way to get this?
T
Put this inside figure tag of your single.php file
$image_caption = get_post(get_post_thumbnail_id())->post_excerpt; if(!empty($image_caption)) { echo '' . $image_caption . ''; }