WordPress.org

Ready to get started?Download WordPress

Forums

Meteor Slides
[resolved] Image not showing when only 1 slide is added (27 posts)

  1. JManDevo
    Member
    Posted 2 years ago #

    Hi guys,

    Basically the plugin works when I add more then 1 slide, however, when only 1 exists, no image at all shows. I'm using the shortcodes.

    Hope someone can help.

    Regards,
    Joe.

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

  2. Josh Leuze
    Member
    Plugin Author

    Posted 2 years ago #

    Hi Joe, there is a problem in 1.5 with slideshows that have only one slide. As you discovered, you can fix this by adding more than one slide. If you need it to work with just one slide, you can download the GitHub master which has a fix for this.

  3. Hedo
    Member
    Posted 2 years ago #

    I try to install the new version but isn't work :(

    I showed the images only if i've 2 slides

  4. Josh Leuze
    Member
    Plugin Author

    Posted 2 years ago #

    You tried to install 1.5, or the master of 1.5.1 from Github? What theme are you using, can you post a link?

  5. Hedo
    Member
    Posted 2 years ago #

    Version: 1.5.1 from Github

    I can't post a link because i'm developing on localhost

  6. JManDevo
    Member
    Posted 2 years ago #

    Just to let you know JLeuze, that worked perfectly thanks!

  7. Josh Leuze
    Member
    Plugin Author

    Posted 2 years ago #

    @JManDevo Thanks for the feedback!

  8. Josh Leuze
    Member
    Plugin Author

    Posted 2 years ago #

    @Hedo The easy fix is to add more than one slide. What theme are you using?

  9. Hedo
    Member
    Posted 2 years ago #

    @Hedo The easy fix is to add more than one slide.

    yeah i know, but sometimes i wish to have only one image.

    What theme are you using?

    A custom template with a child theme from twenty_ten

  10. Josh Leuze
    Member
    Plugin Author

    Posted 2 years ago #

    1.5.1 should work fine in TwentyTen, but I wouldn't be able to tell you why it isn't without inspecting the site.

  11. julfontaine
    Member
    Posted 2 years ago #

    Go to your plugin directory -> meteor-slides -> includes -> meteor-slideshow.php

    Go to line 113, you should see this :

    <?php // Use first slide image as shim to scale slideshow
    
    			if ( $meteor_count == 1 ) {
    
    				$meteor_shim = wp_get_attachment_image_src( get_post_thumbnail_id(), 'featured-slide');
    
    				echo '<img style="visibility: visible;" class="meteor-shim" src="' . $meteor_shim[0] . '" alt="" />';
    
    			} ?>

    switch
    echo '<img style="visibility: hidden;"
    to
    echo '<img style="visibility: visible;"

  12. Josh Leuze
    Member
    Plugin Author

    Posted 2 years ago #

    @julfontaine No, don't do that, that image is a copy of the first slide, it is used only to scale the slideshow responsively, and it should never be seen in the slideshow. If the actual slide images are missing, it is a separate issue and is due to some kind of theme or plugin conflict.

  13. clemttt
    Member
    Posted 1 year ago #

    Hi

    did you find how to resolve the problem of the one picture?

    I almost finished the site and i'm worried about changing the version of my meteor…

  14. Josh Leuze
    Member
    Plugin Author

    Posted 1 year ago #

    @clemttt If you have more than one slide in your slideshow you should be fine.

  15. Marklcm
    Member
    Posted 1 year ago #

    Hello all
    If I want only one slide to display for some reason, I put two slides in the slideshow and use 'Electric Studio Auto Post Expire' to set the slide you don't want displaying to expire immediately.
    Works for me.

  16. mistiquethings
    Member
    Posted 1 year ago #

    @JLeuze,
    when do you think to publish the new release of your plugin with this little correction?
    I have the same problem and for some server questions i cant use the Giftub version...
    (anyway, i love your plugin!) tnkz.

  17. Josh Leuze
    Member
    Plugin Author

    Posted 1 year ago #

    @mistiquethings Meteor Slides 1.5.1 should be released in the next couple of weeks.

  18. mistiquethings
    Member
    Posted 1 year ago #

    tnks,
    we create a simple javascript to patch the problem for the moment:

    var $j = jQuery.noConflict();
    $j(document).ready(function(){
    	if(!$j(".mslide-2").length){
    		$j(".meteor-clip img").css("display","none");
    		$j(".mslide-1, .mslide-1 img").css("display","block");
    		}
    });
  19. Josh Leuze
    Member
    Plugin Author

    Posted 1 year ago #

    Great, good to hear that you've got a fix.

  20. madlefty
    Member
    Posted 1 year ago #

    Well, open meteor-slideshow.php

    Go to line 120

    Switch this

    if ( $meteor_count == 1 ) {
    
    	$meteor_shim = wp_get_attachment_image_src( get_post_thumbnail_id(), 'featured-slide');
    
    	echo '<img style="visibility: hidden;" class="meteor-shim" src="' . $meteor_shim[0] . '" alt="" />';
    
    }

    With this

    if ( $meteor_count == 1 ) {
    
    	$meteor_shim = wp_get_attachment_image_src( get_post_thumbnail_id(), 'featured-slide');
    
    	echo '<img style="visibility:';
    	if($meteor_loop->post_count == 1) echo 'visible';
    	else echo ' hidden';
    	echo ';" class="meteor-shim" src="' . $meteor_shim[0] . '" alt="" />';
    }

    This trick shows first image only when you have 1 slide

  21. Josh Leuze
    Member
    Plugin Author

    Posted 1 year ago #

    @madlefty Thanks for sharing, a fix for this is included in Meteor Slides 1.5.1, you can get the beta on Github.

  22. d.scheltinga
    Member
    Posted 1 year ago #

    @madlefty option works for me but...

    I edited the css file to have a caption but it's not showing anymore:
    with caption: http://wp1.thetykes.com/kleding/
    single image in slider: http://wp1.thetykes.com/service/

    anyone with a solution?

    @jleuze great plugin, thanks a lot!

  23. Josh Leuze
    Member
    Plugin Author

    Posted 1 year ago #

    @d.scheltinga Are you sure you updated everything to the beta of 1.5.1? It looks like the slideshow template and stylesheet are still 1.5? I would make sure you update these and re-apply your changes and then the single slide should work with a caption.

  24. d.scheltinga
    Member
    Posted 1 year ago #

    Thanks, seems it didn't work cause I copied the old stylesheet with my own modifications, now I've updated to the 1.5.1 stylesheet it works!

  25. Josh Leuze
    Member
    Plugin Author

    Posted 1 year ago #

    @d.scheltinga No problem!

  26. lynda@connectionsil.com
    Member
    Posted 1 year ago #

    I had the slide show up and working then updated WordPress and my theme. I deactivated the plug in and widget and put them up again, but the slide show no longer shows up. My site is http://www.connectionsforindependentliving.org

  27. Josh Leuze
    Member
    Plugin Author

    Posted 1 year ago #

    @lynda Looks like you got it working?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic