From 35af8942ab4d422e7cb78ba18f836959661403ff Mon Sep 17 00:00:00 2001 From: Lance Willett Date: Wed, 6 Nov 2013 20:40:10 +0000 Subject: [PATCH] Twenty Fourteen: add full-width featured images for layouts without a content sidebar, but use `wp_is_mobile()` to load smaller-sized images for mobile. Props iamtakashi, fixes #25758. Built from https://develop.svn.wordpress.org/trunk@26026 git-svn-id: http://core.svn.wordpress.org/trunk@25956 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-content/themes/twentyfourteen/functions.php | 1 + .../themes/twentyfourteen/inc/template-tags.php | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/wp-content/themes/twentyfourteen/functions.php b/wp-content/themes/twentyfourteen/functions.php index bbbf24c233..7c8274f5f4 100644 --- a/wp-content/themes/twentyfourteen/functions.php +++ b/wp-content/themes/twentyfourteen/functions.php @@ -69,6 +69,7 @@ function twentyfourteen_setup() { // Add several sizes for Post Thumbnails. add_image_size( 'post-thumbnail-slider', 1038, 576, true ); + add_image_size( 'post-thumbnail-full-width', 1038, 0 ); add_image_size( 'post-thumbnail-grid', 672, 372, true ); add_image_size( 'post-thumbnail', 672, 0 ); diff --git a/wp-content/themes/twentyfourteen/inc/template-tags.php b/wp-content/themes/twentyfourteen/inc/template-tags.php index 191d77588a..6f85115b4d 100644 --- a/wp-content/themes/twentyfourteen/inc/template-tags.php +++ b/wp-content/themes/twentyfourteen/inc/template-tags.php @@ -172,14 +172,21 @@ function twentyfourteen_post_thumbnail() { ?>
- +
-