WordPress.org

Forums

Twenty Fourteen
Page classes (3 posts)

  1. chrispink
    Member
    Posted 1 year ago #

    Two pages, one the home page and another, both use the default page template one gets the class 'grid' the other the class 'singular'.

    The one with 'singular' shows the featured image 72px lower than the other.

    Rather than hacking the theme what causes this difference in page classes?

    the full selector is ; .full-width.singular .site-content .hentry.has-post-thumbnail

    and changing this
    <body class="full-width grid">
    to this
    <body class="full-width singular">

    invokes a -72px padding on the article container

    in fact there are a number of issues with using a featured image on the home page, especially when viewing on <600px devices. What makes this page different?

  2. joxer1
    Member
    Posted 1 year ago #

    @chrispink, obviously, the singular class injection only happens for pages, which are not the front page. You can try to fix ist by replacing the following lines

    if ( is_singular() && ! is_front_page() ) {
    	$classes[] = 'singular';
    }

    with something like this

    if ( is_singular() ) {
    	$classes[] = 'singular';
    }

    in themes/twentyfourteen/functions.php/twentyfourteen_body_classes().

  3. in fact there are a number of issues with using a featured image on the home page

    The gap above a feature image when a static front page is set to use the full-width template is actually a bug, which has been reported - the developers are working on it:

    http://core.trac.wordpress.org/ticket/26694

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic