Meteor Slides
[resolved] Different slideshows in different pages (4 posts)

  1. brexter
    Posted 5 years ago #

    Hi everyone. I'm trying to do something a bit special and i'm wondering if its even possible. I have 4 slideshows named one, two, three and four. I inserted the code:

    <?php if ( function_exists( 'meteor_slideshow' ) ) { meteor_slideshow("one"); } ?>

    in header.php cause i want it to be above the menu bar. The thing is that i would like to have the slideshow "one" shown in home and the slideshow "two" in archives(catgories) and slideshow "three" in About(post) and a slideshow "four" in contact(page).(or at least to have a different one in home than in the rest of the pages)

    I know nothing of php but i keep seeing <?php if (is_home ... and i'm wondering if it possible to add this to the header and tell it to change the slideshow depending on the category, :

    <?php if (is_category(4) || function_exists( 'meteor_slideshow' ) ) { meteor_slideshow( "four", ""); }
    elseif (is_category(3)) { meteor_slideshow( "three", "");}
    elseif (is_category(3)) { meteor_slideshow( "three", "");}
    else { meteor_slideshow( "one", "");}

    Thanks a lot JLeuze for this great pluging

    (by the way, do you think i colud do it combinig the "display widgets" plugin and the "2010 weaver" theme? i'm now using arras theme and i wouldn't like to change but...)


  2. Josh Leuze
    Plugin Author

    Posted 5 years ago #

    Hi brexter, thanks for trying my plugin. Yes, you could use a conditional statement to load different slideshows on different pages.

    Here is a basic example that would load one slideshow on the homepage and another on all the other pages:

    <?php if ( is_front_page() ) {
    meteor_slideshow("home", "");
    } else {
    meteor_slideshow("other", "");
    } ?>

    Check out the documentation for lots more info on conditional tags.

  3. brexter
    Posted 5 years ago #

    thank you JLeuze

  4. Josh Leuze
    Plugin Author

    Posted 5 years ago #

    No problem brexter.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic