Update for dropdown without children
authorSteve Sutton <steve@gaslightmedia.com>
Wed, 28 Oct 2015 20:42:14 +0000 (16:42 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Wed, 28 Oct 2015 20:42:14 +0000 (16:42 -0400)
functions.php

index ac6fec0..4124e8e 100644 (file)
@@ -144,7 +144,7 @@ class Feature_Top_Bar_Walker extends Walker_Nav_Menu {
         if ($item_style) {
             $output .= $item_style;
         }
-        if ($depth == 0 && has_post_thumbnail((int)$object->object_id) && $object->has_children) {
+        if ($depth == 0 && has_post_thumbnail((int)$object->object_id)) {
             $thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id((int)$object->object_id), 'bpla-drop-down');
             $item_html .= '<script>var img_for_menu_' . $object->ID . ' = "' . $thumbnail[0] . '";</script>';
             //$item_html .= '<pre>' . print_r($object, true) . '</pre>';
@@ -225,7 +225,7 @@ function glm_site_scripts()
         'modernizr',
         get_template_directory_uri() . '/js/modernizr/modernizr.min.js'
     );
-    
+
     if(is_front_page()) {
     }