Scrolling doesn't work on homepage

Community Forums Forums General Discussion Scrolling doesn't work on homepage

This topic is: resolved

This topic contains 1 reply, has 1 voice, and was last updated by  FireSamurai 11 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #74116

    FireSamurai
    Participant
    Post count: 42

    I am at a complete loss at the moment. For some reason, scrolling does not work on my site’s homepage. Unfortunately I don’t have a live version of this yet (I’ll see what I can do). I’ve gone through and disabled all my plugins and one-by-one commented out my functions and scripts and gone through them line-by-line. I’m at a loss as to why my front page will not scroll. I have tested all the other pages on the site and they scroll just fine. Any advice, or has anybody ever encountered this before?

    Here is the code of my front-page.php file:

    <?php
    
    /** Enqueue Scripts */
    add_action( 'wp_enqueue_scripts', 'seasoning2013_enqueue_scripts' );
    function seasoning2013_enqueue_scripts() {
    
    	if ( is_active_sidebar( 'about' ) || is_active_sidebar( 'recipes' ) || is_active_sidebar( 'quotation' ) || is_active_sidebar( 'blog' ) ) {
    		
    		//* Navigation easing
    		wp_enqueue_script( 'scrollTo', get_stylesheet_directory_uri() . '/js/jquery.scrollTo.min.js', array( 'jquery' ), '1.4.5-beta', true );
    		wp_enqueue_script( 'localScroll', get_stylesheet_directory_uri() . '/js/jquery.localScroll.min.js', array( 'scrollTo' ), '1.2.8b', true );
    		wp_enqueue_script( 'home', get_stylesheet_directory_uri() . '/js/home.js', array( 'localScroll' ), '', true );
    
    		//* Parallax scrolling
    		wp_enqueue_script( 'skrollr', get_stylesheet_directory_uri() . '/js/skrollr.js', array(), '', true );
    	}
    }
    
    /** Add widget support for homepage. If no widgets are active, display the default loop. */
    add_action( 'genesis_meta', 'seasoning2013_home_genesis_meta' );
    function seasoning2013_home_genesis_meta() {
    
    	if ( is_active_sidebar( 'about' ) || is_active_sidebar( 'recipes' ) || is_active_sidebar( 'quotation' ) || is_active_sidebar( 'blog' ) ) {
    
    		//* Force content-sidebar layout setting
    		add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
    
    		//* Add seasoning2013-home body class
    		add_filter( 'body_class', 'seasoning2013_body_class' );
    
    		//* Remove the navigation menus
    		remove_action( 'genesis_after_header', 'genesis_do_nav' );
    		remove_action( 'genesis_after_header', 'genesis_do_subnav' );
    
    		//* Remove the default Genesis loop
    		remove_action( 'genesis_loop', 'genesis_do_loop' );
    
    		//* Add homepage widgets
    		add_action( 'genesis_loop', 'seasoning2013_homepage_widgets' );
    	}
    }
    
    //* Make a call to skrollr
    add_action( 'wp_footer', 'seasoning2013_call_skrollr', 50 );
    function seasoning2013_call_skrollr() {
    ?>
    	<script type="text/javascript"> skrollr.init(); </script>
    <?php
    }
    
    //* Define the custom body class
    function seasoning2013_body_class( $classes ) {
    	$classes[] = 'seasoning2013-home';
    	return $classes;
    }
    
    //* Replace menu on homepage with a custom one
    add_action( 'genesis_header_right', 'seasoning2013_home_header_right' );
    function seasoning2013_home_header_right() {
        if ( is_home() || is_front_page() ) {
    		unregister_sidebar( 'header-right' );
    		
    		// http://codex.wordpress.org/Function_Reference/wp_nav_menu
    		$args = array(
    			'menu'            => 'home-menu', // menu slug
    			'container_id'    => 'home-nav',
    			'menu_class'      => 'menu genesis-nav-menu',
    		);
    		
    		wp_nav_menu( $args );
    		
        }
    }
    
    //* Widget markup
    function seasoning2013_homepage_widgets() {
    	
    	genesis_widget_area( 'about', array(
    		'before' => '<div id="about" class="about widget-area" data-0="background-position:0px 0px;" data-500="background-position:0px -100px;"><div class="wrap">',
    		'after'  => '</div></div>',
    	) );
    	
    	genesis_widget_area( 'recipes', array(
    		'before' => '<div id="recipes" class="recipes widget-area"><div class="wrap">',
    		'after'  => '</div></div>',
    	) );
    
    	genesis_widget_area( 'quotation', array(
    		'before' => '<div id="quotation" class="quotation widget-area" data-0="background-position:0px 0px;" data-500="background-position:0px -100px;"><div class="wrap">',
    		'after'  => '</div></div>',
    	) );
    
    	genesis_widget_area( 'blog', array(
    		'before' => '<div id="blog" class="blog widget-area"><div class="wrap">',
    		'after'  => '</div></div>',
    	) );
    }
    
    genesis();

    My Websites: TheCookingDish.com | ChrisMower.com
    Connect with me: Facebook | Pinterest | Twitter | Google +

    http://localhost
    #74118

    FireSamurai
    Participant
    Post count: 42

    OMG, I finally found the issue after hours of searching… the culprit? An overflow: hidden; declaration. I will now celebrate by crying tears of joy.


    My Websites: TheCookingDish.com | ChrisMower.com
    Connect with me: Facebook | Pinterest | Twitter | Google +

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

You must be logged in to reply to this topic.