Forum Replies Created

Viewing 1 replies (of 1 total)
  • johnhunt

    (@johnhunt)

    Hey,

    I started using your plugin today and noticed it doesn’t really support using the thumbnail caption… with the normal thumbnail you just do this:

    Image: <?php the_post_thumbnail(); ?><br>
    Caption: <?php echo get_post(get_post_thumbnail_id())->post_excerpt; ?>

    But I ended up having to do this to get the caption from a secondary featured image (note, I’m using this on pages):

    $second_thumbnail_id = get_post_meta(get_the_ID(), "page_secondary-image_thumbnail_id", false);
    $second_id = $second_thumbnail_id[0];
    
    // The thumbnail caption:
    echo get_post($second_id)->post_excerpt;

    I guess what’s needed really is for you to make get_post_thumbnail_id() return the post id for the thumbnail if you can.

    Btw, love the plugin, made my life easier!

Viewing 1 replies (of 1 total)