removed ul from off canvas menu
authorAnthony Talarico <talarico@gaslightmedia.com>
Thu, 28 Jan 2016 17:22:05 +0000 (12:22 -0500)
committerAnthony Talarico <talarico@gaslightmedia.com>
Thu, 28 Jan 2016 17:22:05 +0000 (12:22 -0500)
js/app.js
lib/navigation.php

index 0be6ec2..586b673 100644 (file)
--- a/js/app.js
+++ b/js/app.js
@@ -201,4 +201,5 @@ $(document).ready(function () {
        $(this).removeClass("active") ;
     });
     $("#menu-top-menu-1").children("li:nth-child(2)").children("a:nth-child(1)").addClass("offCanvasLinks");
+
 });
index 2308037..75095b5 100644 (file)
@@ -32,9 +32,8 @@ if ( ! function_exists( 'glm_theme_top_bar' ) ) {
  */
 if ( ! function_exists( 'glm_theme_mobile_off_canvas' ) ) {
     function glm_theme_mobile_off_canvas() {
-        echo '<div class="left-off-canvas-list">';
-        echo '<ul><li class="page_item"><a href="' . get_bloginfo('url') . '">Home</a></li>';
-        wp_nav_menu(array(
+       
+       $menu = wp_nav_menu(array(
             'container' => false,                           // remove nav container
             'container_class' => '',                        // class of container
             'menu' => '',                                   // menu name
@@ -48,7 +47,7 @@ if ( ! function_exists( 'glm_theme_mobile_off_canvas' ) ) {
             'fallback_cb' => false,                         // fallback function (see below)
             'walker' => new Glm_Theme_Off_Canvas_Walker()
         ));
-        echo '</ul></div>';
+         return preg_replace( array( '%^<ul[^>]*>%', '%</ul>$%' ), '', $menu );
     }
 }
 if ( ! function_exists( 'glm_topLinks_mobile_off_canvas' ) ) {