diff --git a/wp-content/themes/twentytwelve/functions.php b/wp-content/themes/twentytwelve/functions.php index c1d8d37696..a7c87e7288 100644 --- a/wp-content/themes/twentytwelve/functions.php +++ b/wp-content/themes/twentytwelve/functions.php @@ -115,7 +115,7 @@ function twentytwelve_scripts_styles() { $protocol = is_ssl() ? 'https' : 'http'; wp_enqueue_style( 'twentytwelve-fonts', "$protocol://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700" ); } - + /** * Load our main CSS file. */ @@ -338,7 +338,8 @@ endif; * Extends the default WordPress body class to denote: * 1. Using a full-width layout, when no active widgets in the sidebar * or full-width template. - * 2. White or empty background color to change the layout and spacing. + * 2. A thumbnail in the Homepage page template. + * 3. White or empty background color to change the layout and spacing. * * @since Twenty Twelve 1.0 */ @@ -348,6 +349,9 @@ function twentytwelve_body_class( $classes ) { if ( ! is_active_sidebar( 'sidebar-1' ) || is_page_template( 'full-width-page.php' ) ) $classes[] = 'full-width'; + if ( is_page_template( 'homepage.php' ) && has_post_thumbnail() ) + $classes[] = 'has-post-thumbnail'; + if ( empty( $background_color ) ) $classes[] = 'custom-background-empty'; elseif ( in_array( $background_color, array( 'fff', 'ffffff' ) ) ) diff --git a/wp-content/themes/twentytwelve/homepage.php b/wp-content/themes/twentytwelve/homepage.php index aacbb13683..e310907a1b 100644 --- a/wp-content/themes/twentytwelve/homepage.php +++ b/wp-content/themes/twentytwelve/homepage.php @@ -12,23 +12,16 @@ get_header(); ?>