WordPress.org

Ready to get started?Download WordPress

Forums

Meteor Slides
Add category/tag/ id to a slide? (4 posts)

  1. anita@joli.com.au
    Member
    Posted 2 years ago #

    I would like each of my slides (in one particular slideshow) to have an id applied to them (so I can target CSS individually). I imagine that if one could add a cateogory or tag to a slide then this could be used in the template to add an id to the img or to the wrapper.

    Is this a piece of cake? possible? too hard?

    I will look at doing it, but would like to hear your thoughts on how to do it, or if it is already available, but I haven't noticed.

    thanks

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

  2. Josh Leuze
    Member
    Plugin Author

    Posted 2 years ago #

    Hi Anita, the slides don't have an ID, but they do each have a unique class. They are each numbered: mslide-1, mslide-2, etc. So you can style all the slides using mslide, or a specific slide using it's number.

    If you want to style a certain slide in just one slideshow, combine this with the ID of the slideshow. Like if you want to style the first slide in the "header" slideshow, you could do that like this:

    #meteor-slideshowheader .mslide-1 {
    border: solid 1px red;
    }
  3. anita@joli.com.au
    Member
    Posted 2 years ago #

    Thanks for your response. What I have at the moment is this:
    <?php the_post_thumbnail( 'featured-slide',array('id'=>trim(strip_tags( $post->post_name ))) ); ?>

    which gives me

    <img width="229" height="350" id="ecodynamics" title="droplet-mask" alt="droplet-mask" class="attachment-featured-slide wp-post-image" src="http://localhost/wpecohy/wp-content/uploads/2012/03/droplet-mask.png">

    which is just what I was looking for!
    When I have tried this out a bit more, I will know if your solution or this one is what I really need.

  4. Josh Leuze
    Member
    Plugin Author

    Posted 2 years ago #

    Cool, that works too! As long as you have a way to target a specific slide, or slide image, it shouldn't matter how you get there.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic