The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

[closed] how to add a slider feature on homepage only (4 posts)

  1. rainbow17
    Posted 4 years ago #


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

    anybody? help?


  2. vtxyzzy
    Posted 4 years ago #

    Take a look at this site: http://allgoodpizza.com/

    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
  3. vibhors390@gmail.com
    Posted 3 years ago #

    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??

  4. Andrew Nevins
    Forum moderator
    Posted 3 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic