Add Full Width Slider to Child Theme Home Page

Community Forums Forums Design Tips and Tricks Add Full Width Slider to Child Theme Home Page

This topic is: not resolved

This topic contains 2 replies, has 2 voices, and was last updated by  KM 11 months, 4 weeks ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #63627

    KM
    Participant
    Post count: 23

    Hello, how do I add a full width slider to the Home page of the Child Theme? I am using EasingSlider. http://easingslider.com/

    I have registered the widget area successfully by adding the following php to the functions.php file:

    genesis_register_sidebar( array(
    ‘id’ => ‘home-slider’,
    ‘name’ => __( ‘Home Slider’, ‘sample’ ),
    ‘description’ => __( ‘This is the home slider’, ‘sample’ ),
    ) );

    But now how do I hook it to the Home Page only right after the Primary Navigation? I tried Brian Gardner’s following code but it puts the slider on every page:

    /** Add the home featured section */
    add_action( ‘genesis_after_header’, ‘sample_home_slider’ );
    function sample_home_slider() {

    /** Do nothing on page 2 or greater */
    if ( get_query_var( ‘paged’ ) >= 2 )
    return;

    genesis_widget_area( ‘home-slider’, array(
    ‘before’ => ‘<div class=”home-slider widget-area”>’,
    ) );

    }

    Thank you.

    #63635

    braddalton
    Participant
    Post count: 9724

    No need to create a widget area.

    Its more efficient to simply hook in the slider. http://wpsites.net/web-design/image-slider-home-page-only/#Display_Slider_In_StudioPress_Themes

    You may want to change the hook in the code from genesis_header to genesis_after_header


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #63756

    KM
    Participant
    Post count: 23

    Thank you Brad, I’ll give that a try.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.