• Resolved Kast

    (@kast)


    I can’t seem to retrieve the caption of images. Here’s my current code, minus my echo/output statements:

    if( class_exists('Dynamic_Featured_Image') ) {
         global $dynamic_featured_image;
         $featured_images = $dynamic_featured_image->get_featured_images();
    
          foreach($featured_images as $image) {
    	    $url = $image['full'];
    	    $caption = $dynamic_featured_image->get_image_caption($url);
    	}
    }

    $url returns the correct image URL, but $caption consistently comes back blank, even when directly passed a hardcoded (valid) string value for an image URL.

    Any ideas? Thanks in advance.

    https://wordpress.org/plugins/dynamic-featured-image/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Retrieving Image Caption Doesn't Seem to Be Working’ is closed to new replies.