Reference menu id instead of page id for dropdown thumbnails
authorLaury GvR <laury@gaslightmedia.com>
Tue, 7 May 2019 20:22:56 +0000 (16:22 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Tue, 7 May 2019 20:22:56 +0000 (16:22 -0400)
lib/menu-walker.php

index c3cced9..4f13185 100644 (file)
@@ -112,7 +112,7 @@ class Glm_Theme_Top_Bar_Walker extends Walker_Nav_Menu {
             background-size: cover;
             </style>";
 
-        } else if( $depth !== 0 && 1410 == (int)$object->object_id ){
+        } else if( $depth !== 0 && 1464 == (int)$object->ID ){
             $thumbnail = get_template_directory_uri() . '/assets/run-mackinac.jpg';
             $item_style .= "<style>
             #menu-main #menu-item-".$object->ID.":before {
@@ -124,7 +124,7 @@ class Glm_Theme_Top_Bar_Walker extends Walker_Nav_Menu {
             background-size: cover;
             </style>";
 
-        } else if( $depth !== 0 && 1433 == (int)$object->object_id ){
+        } else if( $depth !== 0 && 1465 == (int)$object->ID ){
             $thumbnail = get_template_directory_uri() . '/assets/chicago-yacht-race.jpg';
             $item_style .= "<style>
             #menu-main #menu-item-".$object->ID.":before {