From b6568bfff1631967900706584d2f9d79acf919e8 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Wed, 1 Aug 2018 10:26:35 -0400 Subject: [PATCH] Update image sizes in the drop down. Use medium size. --- sections/top-bar.php | 14 +++++++------- style.css | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sections/top-bar.php b/sections/top-bar.php index f8aac26..2f85a40 100644 --- a/sections/top-bar.php +++ b/sections/top-bar.php @@ -23,7 +23,7 @@ -slug; @@ -41,7 +41,7 @@ foreach($post_ids as $p=>$value){ } foreach($post_data as $pd=>$value){ if(has_post_thumbnail($value->ID) ){ - $dropdown_image = wp_get_attachment_image_src( get_post_thumbnail_id( $value->ID ), array(300,250) ); + $dropdown_image = wp_get_attachment_image_src( get_post_thumbnail_id( $value->ID ), 'medium' ); $dropdown[$value->ID]['image'] = $dropdown_image[0]; } else { $dropdown_image = false; @@ -52,9 +52,9 @@ foreach($post_data as $pd=>$value){ } else { $dropdown[$value->ID]['excerpt'] = " "; } - + $dropdown[$value->ID]['menu'] = $pd; - + } $dropdown = json_encode($dropdown); ?> @@ -64,11 +64,11 @@ $dropdown = json_encode($dropdown); var image = ''; var topbar = page.find('.top-bar-section > ul'); var dropdown = ; - + $.each(dropdown, function(i, value){ var menu = value.menu; var excerpt = value.excerpt; - + if (value.image){ image = value.image; page.find('#'+value.menu).children('ul.dropdown').append(''); @@ -79,4 +79,4 @@ $dropdown = json_encode($dropdown); } }); }); - \ No newline at end of file + diff --git a/style.css b/style.css index 38512ad..69f49e9 100644 --- a/style.css +++ b/style.css @@ -3,5 +3,5 @@ Theme Name: circlemichigan Author: Gaslight Media Author URI: http://www.gaslightmedia.com Description: A theme for Circle Michigan -Version: 1.0.0 +Version: 1.0.1 */ -- 2.17.1