Support » Fixing WordPress » how to add a slider feature on homepage only

  • Hello…

    i would like to add a slider function to homepage only,
    while in the rest of pages will be a regular image.

    anybody? help?


Viewing 3 replies - 1 through 3 (of 3 total)
  • Take a look at this site:

    I use the Meteor Slides plugin. I made a child theme and copied the parent header.php and added code to it to check for front page and add the slider:

    <?php if (is_front_page()
          && function_exists('meteor_slideshow')) {
    } else {
    } ?>

    The exact place to insert this code depends on your theme.

    The agp-header.php file checks for a post or page with a large image to use as the header:

    // Check if this is a post or page, if it has a thumbnail, and if it's a big one
    if ( is_singular() && has_post_thumbnail( $post->ID )
          && ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' ) )
          && image[1] >= HEADER_IMAGE_WIDTH ) :
       // Houston, we have a new header image!
       echo "<div class='agp-custom-header'>";
       echo get_the_post_thumbnail( $post->ID, array(1000,252) );
       echo "</div>";
    else :
       // Code here for default header image

    hi I am new user to wordpress
    I know very basic things
    I am currently using sterling theme
    in which I have created the static page as my home page
    now, I want to add the LayerSlider to the home page ie. it becomes
    part of widget I want to add it to my page
    how should I do it???

    help me??

    Moderator Andrew Nevins


    Front-end developer

    Please create a new thread if you want to discuss your own issues.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘how to add a slider feature on homepage only’ is closed to new replies.