Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Dan Stramer

    (@danstramer)

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

    Plugin Author Josh Leuze

    (@jleuze)

    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?

    Thread Starter Dan Stramer

    (@danstramer)

    Yes, the editor added them in.

    Thanks
    Dan

    Plugin Author Josh Leuze

    (@jleuze)

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Meteor Slides] background images’ is closed to new replies.