Meteor Slides
Captions for slide show images (6 posts)

  1. QRMonkey
    Posted 4 years ago #

    I have followed the post noted below to include captions for each of my slide show images, but as of yet no success.


    meteor-slides.css and meteor-slideshow.php have been moved to my theme directory. Paths have been changed to reflect the move of the slide show navigation.

    I have updated meteor-slideshow.php with the following, and confirmed that there is copy describing the image within the media library. Code looks like this:

    <?php // Get the featured image's description

    $ms_thumb_id = get_post_thumbnail_id($id);

    $ms_description = esc_attr( get_post_field( 'post_content', $ms_thumb_id ) );

    echo '<p>' . $ms_description . '</p>';


    </div><!-- .mslide -->



  2. Josh Leuze
    Plugin Author

    Posted 4 years ago #

    Hey, I would try to use the title of the slide post as the caption instead. It is easier to add and easier to manage since you can edit the title right from the slide post and you don't need to dig in and edit the image metadata.

    Check out the documentation on using a custom slideshow template for more information on how to use the titles.

  3. QRMonkey
    Posted 4 years ago #

    Thanks! I will give this a try today.

  4. Josh Leuze
    Plugin Author

    Posted 4 years ago #

    No problem, hopefully that works better!

  5. jalancast
    Posted 4 years ago #

    In case you want to display the caption instead of just displaying the title, I found this code to be useful:

    <?php $excerpt = get_post( get_post_thumbnail_id() )->post_excerpt; echo $excerpt; ?>

    Add it to the custom slide template file you create in your theme, prior to the closing </div><!-- .mslide --> so that it's the last thing loaded in each loop.

    Hat tpp to http://www.billerickson.net/wordpress-featured-image-captions/ for this snippet.

    P.S> Jleuze - Great plugin. Please add this to the documentation. I spent some time looking for it.

  6. Josh Leuze
    Plugin Author

    Posted 4 years ago #

    Thanks for sharing, I'll add it to the documentation so it's easier to find.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic