WordPress.org

Ready to get started?Download WordPress

Forums

Meteor Slides
background images (5 posts)

  1. danstramer
    Member
    Posted 2 years ago #

    Hi
    Can I use the slide images as background images instead of images inside the "mslide" DIV?
    Can the meteor-slideshow.phph file be modified that way?

    Thanks
    Dan

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

  2. danstramer
    Member
    Posted 2 years ago #

    Ok, I think I figured it out, it seems to be working, but would be glad to hear your insights:

    <?php // Loop which loads the slideshow</p>
    while ( $loop->have_posts() ) : $loop->the_post(); ?>
    <?php
    $src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID),  false, '' );
    ?>
    			<div class="mslide mslide-<?php echo $i; ?>" style="background:url(<?php echo $src[0]; ?>) no-repeat right top;">
    <p>			</div><!-- .mslide --></p>
    <p>			<?php $i++; ?></p>
    <p>		<?php endwhile; ?>
  3. Josh Leuze
    Member
    Plugin Author

    Posted 2 years ago #

    Yeah, that's right, you just get the URL for the featured image and use inline CSS to set it as the background image.

    Those paragraph tags could be a problem though, did they get added on accident?

  4. danstramer
    Member
    Posted 2 years ago #

    Yes, the editor added them in.

    Thanks
    Dan

  5. Josh Leuze
    Member
    Plugin Author

    Posted 2 years ago #

    OK then that should work fine, I've done the same without any issues.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic