Reply To: Blog layout and random questions

Home Forums Support Blog layout and random questions Reply To: Blog layout and random questions

#232292
Tom
Lead Developer
Lead Developer

1. You could set the blog to use separate containers with this function:

add_filter( 'body_class', 'yannick_body_class', 100, 2 );
function yannick_body_class( $wp_classes, $extra_classes )
{
    $wp_classes[] = 'one-container';
    if ( is_home() ) {
        $wp_classes = array_diff( $wp_classes, array( 'separate-containers' ) );
    } else {
        $wp_classes = array_diff( $wp_classes, array( 'one-container' ) );
    }

    // Add the extra classes back untouched
    return array_merge( $wp_classes, (array) $extra_classes );
}

2. You can do that on the blog like this:

.blog .site-header,
.blog .secondary-navigation,
.blog .post-image,
.blog .entry-header {
    display: none;
}

.blog is the main posts page, .archive is the categories, archives etc..

3. That’s correct, the excerpt should work if set in “Customize > Blog > Blog Content”. If that’s not working, make sure the more tag isn’t being used: https://generatepress.com/knowledgebase/using-the-more-tag/