WordPress.org

Ready to get started?Download WordPress

Forums

Meteor Slides
[resolved] I only want to use Meteor Slides in some page headers and not others. (4 posts)

  1. djdancer
    Member
    Posted 1 year ago #

    I only want to use Meteor Slides in some page headers and not others. I checked the "change header image" then selected image. I can see it's there but it's above the Meteor Slides and the slides are still there.

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

  2. Josh Leuze
    Member
    Plugin Author

    Posted 1 year ago #

    You can do this with a PHP conditional, here's an example that would load the slideshow on the frontpage and the about page:

    <?php if ( is_front_page() ) {
    	if ( function_exists( 'meteor_slideshow' ) ) { meteor_slideshow( "home","" ); }
    } elseif ( is_page( 'about' ) ) {
    	if ( function_exists( 'meteor_slideshow' ) ) { meteor_slideshow( "about","" ); }
    } ?>
  3. djdancer
    Member
    Posted 1 year ago #

    can you explain this further? Where do I put this .php in the header.php? I followed the instructions for the meteor slideshow.

    I added the following in header.php:

    <div class="slide-wrapper">
    <?php if ( function_exists( 'meteor_slideshow' ) ) { meteor_slideshow(); } ?>
    </div>
    <div class="logo">

    I added the following to styles.css:
    div.slide-wrapper
    { position: absolute;
    display: block;
    top: 102px;
    left: 66px;
    height: 250px;
    width: 1050px;
    }

    The code works great but I only want it to show up in my header on some pages. If I add the .php that you wrote do I leave the code in the header.php and add yours to it? Will I need additional code in my styles.css?

    Thanks!

  4. Josh Leuze
    Member
    Plugin Author

    Posted 1 year ago #

    Just replace the standard template tag with the conditional one:

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic