Viewing 3 replies - 1 through 3 (of 3 total)
  • Have you found a way to do this? I’d also like to do the same.

    Thread Starter myrko

    (@myrko)

    No unfortunately not. If you find anything, let me know!

    I’ve used this function code from this thread:

    // Get Featured Image Caption
    function the_post_thumbnail_caption() {
      global $post;
    
      $thumbnail_id    = get_post_thumbnail_id($post->ID);
      $thumbnail_image = get_posts(array('p' => $thumbnail_id, 'post_type' => 'attachment'));
    
      if ($thumbnail_image && isset($thumbnail_image[0])) {
        echo '<p class="caption">'.$thumbnail_image[0]->post_excerpt.'</p>';
      }
    }

    Usage:

    <? echo the_post_thumbnail_caption(); ?>

    Then for sidebar placement I just use the echo in a Text Widget below The Featured Image Widget using PHP Text Widget which let’s it execute php code.

    I’t s a work-around, but it works pretty well. ??

    -mpm

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Featured Image Widget] Display Description / Caption’ is closed to new replies.