diff --git a/global-templates/left-sidebar-check.php b/global-templates/left-sidebar-check.php index e1ad548..89203a9 100644 --- a/global-templates/left-sidebar-check.php +++ b/global-templates/left-sidebar-check.php @@ -47,7 +47,3 @@ if ( $is_woocommerce ) { echo $html; } } - - - - diff --git a/inc/enqueue.php b/inc/enqueue.php index e2a7663..a6a04b5 100644 --- a/inc/enqueue.php +++ b/inc/enqueue.php @@ -5,8 +5,6 @@ * @package understrap */ - - if ( ! function_exists( 'understrap_scripts' ) ) { /** * Load theme's JavaScript sources. @@ -20,30 +18,6 @@ if ( ! function_exists( 'understrap_scripts' ) ) { if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } - - // menu - vertical page association - // do not load on WooCommerce pages - // do not load if we are in WooCommerce pages. - $loadit = true; - if ( class_exists( 'WooCommerce' ) ) { - if ( is_woocommerce() ) { - $loadit = false; - } - } - if ( ( is_page_template ( 'page-templates/vertical-one-page.php' ) || is_home() || is_single() ) && $loadit ) { - wp_enqueue_script( 'vertical-one-page', get_template_directory_uri() . '/js/vertical-one-page.js', - array( 'jquery' ), true ); - $page_for_posts = strtolower( get_the_title( get_option( 'page_for_posts' ) ) ); - $home_url = home_url(); - $is_single = is_single(); - $vars = array( - 'pageForPosts' => $page_for_posts, - 'homeUrl' => $home_url, - 'isSingle' => $is_single, - ); - wp_localize_script( 'vertical-one-page', 'vars', $vars ); - } - // menu - vertical page association end. } } // endif function_exists( 'understrap_scripts' ). diff --git a/js/vertical-one-page.js b/js/vertical-one-page.js deleted file mode 100644 index bd6bc5c..0000000 --- a/js/vertical-one-page.js +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Vertical page navigation - * A temporary source file providing smooth scrolling navigation to Pages - */ -(function( $ ) { - var currentPage = location.href; - var adjustedHeight = $( 'body' ).hasClass( 'admin-bar' ) ? 36 : 0; - var blogPage = vars.homeUrl + '/' + vars.pageForPosts; - if ( currentPage.substr( -1 ) === '/' ) { - currentPage = currentPage.substr( 0, currentPage.length - 1 ); - } - - $( document ).ready(function() { - // smoothly scroll to an ID - $( '#main-menu li a' ).click( function ( e ) { - var target; - // if not on root URL - if ( currentPage === blogPage || vars.isSingle ) { - target = $(this); - target = vars.homeUrl + '/' + target[0].hash; - location = target; - } - target = $( this.hash ); - target = target.length ? target : $( '[name=' + this.hash.slice(1) + ']' ); - if ( target.length ) { - - $( 'html, body' ).delay( 100 ).animate({ - scrollTop: target.offset().top - adjustedHeight - }, 800); - // put the hash in location bar - window.history.pushState( null, null, e.delegateTarget.href ); - return false; - } - }); - }); -})( jQuery ); diff --git a/page-templates/vertical-one-page.php b/page-templates/vertical-one-page.php deleted file mode 100755 index e04fd9c..0000000 --- a/page-templates/vertical-one-page.php +++ /dev/null @@ -1,70 +0,0 @@ - - - 'page', - 'post__not_in' => $exclude, - 'orderby' => 'menu_order', - 'order' => 'ASC', -); - -$qry = new WP_Query( $args ); -?> - -