From 8b481f300bcee7cc73f866a2fec4cf04c7fcf856 Mon Sep 17 00:00:00 2001 From: Lance Willett Date: Wed, 6 Nov 2013 20:39:50 +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. git-svn-id: https://develop.svn.wordpress.org/trunk@26026 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-content/themes/twentyfourteen/functions.php | 1 + .../themes/twentyfourteen/inc/template-tags.php | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/wp-content/themes/twentyfourteen/functions.php b/src/wp-content/themes/twentyfourteen/functions.php index bbbf24c233..7c8274f5f4 100644 --- a/src/wp-content/themes/twentyfourteen/functions.php +++ b/src/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/src/wp-content/themes/twentyfourteen/inc/template-tags.php b/src/wp-content/themes/twentyfourteen/inc/template-tags.php index 191d77588a..6f85115b4d 100644 --- a/src/wp-content/themes/twentyfourteen/inc/template-tags.php +++ b/src/wp-content/themes/twentyfourteen/inc/template-tags.php @@ -172,14 +172,21 @@ function twentyfourteen_post_thumbnail() { ?>
- +
-