Support » Plugin: Meteor Slides » Slideshow Templates – more than 1

  • Resolved Dan Stramer

    (@danstramer)


    Hello Josh,
    I would like to have 3 slideshow templates in my site.
    Is that possible?

    Thanks
    Dan

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Josh Leuze

    (@jleuze)

    Hi Dan, it is possible to do that. Meteor Slides looks for a single custom slideshow template in your theme, but you can setup some conditionals in your template to switch it up for each slideshow you need.

    This could be as simple as adding captions to just one slideshow using something like this:

    
    if ( $slideshow == 'caption-slideshow' ) {
    	echo '<div class="meteor-caption">' . get_the_title() . '</div>';
    }
    

    Or you could setup the whole template as conditional like this:

    
    if ( $slideshow == 'caption-slideshow' ) {
    	// Paste meteor-slideshow.php template with captions here
    } elseif ( $slideshow == 'custom-slideshow' ) {
    	// Paste meteor-slideshow.php template with customizations here
    } else {
    	// Paste default meteor-slideshow.php template here for all other slideshow
    }
    

    That would replace all the code in that template, and then you would add all that code back in for the default part, with modified versions for the other two. You could also make your own custom template files and load them into those conditionals to keep each in a separate file.

    • This reply was modified 1 year, 1 month ago by  Josh Leuze.

    Thank you very much Josh for your detailed explanation!
    I’ll try it out.

    Dan

    Plugin Author Josh Leuze

    (@jleuze)

    No problem Dan, let me know if you have any more questions!

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Slideshow Templates – more than 1’ is closed to new replies.