Make WordPress Core


Ignore:
Timestamp:
10/21/2016 10:14:26 PM (8 years ago)
Author:
davidakennedy
Message:

Twenty Seventeen: Display featured image on static front page

This improves UX, since an image added will be displayed on front end as opposed to not at all. This fix added the front page's featured image above the front page content, similar to how it's handled in the other panels. Also it removed code that was setting the front page's featured image as a fallback to the custom header, and updated the conditions that add the has-header-image to remove reference to the front page's featured image.

Props laurelfulford.

Fixes #38402.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyseventeen/inc/template-functions.php

    r38833 r38868  
    3535    }
    3636
    37     // Add a class if there is a featured image or custom header.
    38     if ( has_header_image() || ( has_post_thumbnail() && twentyseventeen_is_frontpage() ) ) {
     37    // Add a class if there is a custom header.
     38    if ( has_header_image() ) {
    3939        $classes[] = 'has-header-image';
    4040    }
Note: See TracChangeset for help on using the changeset viewer.