Thumbnail size change for the dropdown
authorLaury GvR <laury@gaslightmedia.com>
Fri, 26 May 2017 20:41:08 +0000 (16:41 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Fri, 26 May 2017 20:41:08 +0000 (16:41 -0400)
functions.php
lib/menu-walker.php

index d0fa9f6..6f53109 100644 (file)
@@ -195,6 +195,7 @@ add_action('init', 'mytheme_init', 10);
 
 function wpse_setup_theme() {
     add_image_size('glm-block-image', 290, 190,true);
+    add_image_size('nav-featured-product-thumb', 100, 120,true);
 }
 
 add_action( 'after_setup_theme', 'wpse_setup_theme' );
index 7715cb2..652934b 100644 (file)
@@ -74,7 +74,7 @@ class Glm_Theme_Top_Bar_Walker extends Walker_Nav_Menu {
                 $output .= "\n<li>\n";
                 $output .= "\n<div class=\"shop-drop featured-drop\">\n";
                 $output .= "\n<h1>Featured Product</h1>\n";
-                $output .= "\n<div class='top-nav-featured-product'><img src='".get_the_post_thumbnail_url($featured_product->ID, array(100, 120))."'></div>\n";
+                $output .= "\n<div class='top-nav-featured-product'><img src='".get_the_post_thumbnail_url($featured_product->ID, 'nav-featured-product-thumb')."'></div>\n";
                 $output .= "\n<a class=\"button\" href=\"" . get_permalink( $featured_product->ID ) . "\">Buy Now</a>\n";
                 $output .="\n</div>\n";
                 $output .="\n</li>\n";