Support » Plugin: Meteor Slides » [Plugin: Meteor Slides] Questions: how to remove navigation for a single slide, how to recursive

  • I have two tricky questions:

    1) How can I automatically hide the navigation when only a single slide is in the slideshow?

    2) If no matching slideshow slug, what would be the method to “look back in the page ancestry” and display the topmost ancestor’s slideshow instead? I am looking into making “section” slideshows, if that makes sense. Slideshows that display on every page in a “Section” – example: all pages and sub pages in the “about us” section of a website.

    My current code displays a slideshow based on page slug:

    if ( function_exists( 'meteor_slideshow' ) ) { meteor_slideshow($post->post_name, "width: 1024, height: 658" ); }

    I believe we should need to integrate something based on this, but I cannot quite get it:
    echo get_page(array_pop(get_post_ancestors($post->ID)))->post_title;

    Thank you!

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Woohoo, I believe may have found my solution for the second question on my own, am testing this further now:

    <?php
    if ( function_exists( 'meteor_slideshow' ) ) { meteor_slideshow(get_page(array_pop(get_post_ancestors($post->ID)))->post_title, "width: 1024, height: 658" ); }
    ?>
    Plugin Author Josh Leuze

    (@jleuze)

    I haven’t really been testing the slideshow with one slide, but this has been coming up more often, so I will probably add better support for a single slide in a future version.

    You can load the navigation conditionally using a custom slideshow template. Take the code for the navigation from lines 65-97 and wrap them in a conditional like this:

    <?php if ( $loop->post_count > 1 ) : ?>
    
    	<?php // Adds Previous/Next and Paged navigation
    	...
    	<?php endif; ?>
    
    <?php endif; ?>

    Did you get that second question figured out?

    Thank you, I did get that second question figured out.

    I’ll give the conditional php a shot…

    Placing the conditional around the navigation is the perfect fix for that. I recommend building it into the next plugin version.

    Plugin Author Josh Leuze

    (@jleuze)

    Cool, I’ll see what I can do!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: Meteor Slides] Questions: how to remove navigation for a single slide, how to recursive’ is closed to new replies.