From eccc4fd3a658c8eb72dda7e72d178cc4bb516e89 Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Wed, 25 Oct 2017 09:20:58 -0400 Subject: [PATCH] adding image sizes for the hover map setting thumbnail sizes for the hover map images on the front page --- functions.php | 1 + parts/header-meta.php | 2 +- parts/map-section.php | 4 ++-- style.css | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/functions.php b/functions.php index 61b089a..1f0358e 100644 --- a/functions.php +++ b/functions.php @@ -118,6 +118,7 @@ add_action('init', 'mytheme_init', 10); function wpse_setup_theme() { add_image_size('glm_blocks', '600', '600', true); add_image_size('glm_blocks_small', '500', '333',true); + add_image_size('glm-map-image', 290, 190,true); } add_action( 'after_setup_theme', 'wpse_setup_theme' ); diff --git a/parts/header-meta.php b/parts/header-meta.php index ca6aeae..a2695ec 100644 --- a/parts/header-meta.php +++ b/parts/header-meta.php @@ -3,7 +3,7 @@ <?php wp_title(); ?> - + diff --git a/parts/map-section.php b/parts/map-section.php index ced50ac..1b95f39 100644 --- a/parts/map-section.php +++ b/parts/map-section.php @@ -14,11 +14,11 @@ // $content = strip_shortcodes($content); $content = get_excerpt_by_id($city_page[0]->ID, 55); $city_image_id = get_post_thumbnail_id($city_page[0]->ID); - $city_image = wp_get_attachment_image_src( $city_image_id, 250,250, true); + $city_image = wp_get_attachment_image_src( $city_image_id, 'glm-map-image', true); $city_url = get_permalink($city_page[0]->ID); if($city_image_id){ - $city_image = wp_get_attachment_image_src( $city_image_id, 250,250, true); + $city_image = wp_get_attachment_image_src( $city_image_id, 'glm-map-image', true); $city_image = $city_image[0]; } else { $city_image = get_template_directory_uri() .'/assets/default.jpg'; diff --git a/style.css b/style.css index c87aaeb..05e6572 100644 --- a/style.css +++ b/style.css @@ -3,5 +3,5 @@ Theme Name: Coldwater Author: Gaslight Media Author URI: http://www.gaslightmedia.com Description: A theme for coldwater -Version: 1.0.0 +Version: 1.0.1 */ -- 2.17.1