WordPress.org

Ready to get started?Download WordPress

Forums

Meteor Slides
Captions for slide show images (6 posts)

  1. QRMonkey
    Member
    Posted 1 year ago #

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

    http://wordpress.org/support/topic/plugin-meteor-slides-add-image-caption?replies=10

    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 -->

    Thanks!

    http://wordpress.org/extend/plugins/meteor-slides/

  2. Josh Leuze
    Member
    Plugin Author

    Posted 1 year 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
    Member
    Posted 1 year ago #

    Thanks! I will give this a try today.

  4. Josh Leuze
    Member
    Plugin Author

    Posted 1 year ago #

    No problem, hopefully that works better!

  5. jalancast
    Member
    Posted 1 year 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
    Member
    Plugin Author

    Posted 1 year 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