Community Forums › Forums › Archived Forums › General Discussion › Scrolling doesn't work on homepage
Tagged: broken scroll, front page, homepage, No scroll
- This topic has 1 reply, 1 voice, and was last updated 10 years, 5 months ago by FireSamurai.
-
AuthorPosts
-
November 18, 2013 at 9:00 pm #74116FireSamuraiMember
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:
http://localhost<?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();
November 18, 2013 at 9:58 pm #74118FireSamuraiMemberOMG, I finally found the issue after hours of searching... the culprit? An
overflow: hidden;
declaration. I will now celebrate by crying tears of joy. -
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.