diff --git a/src/wp-content/themes/twentyseventeen/inc/customizer.php b/src/wp-content/themes/twentyseventeen/inc/customizer.php index a5a0b1f2a1..6e2db28162 100644 --- a/src/wp-content/themes/twentyseventeen/inc/customizer.php +++ b/src/wp-content/themes/twentyseventeen/inc/customizer.php @@ -79,12 +79,12 @@ function twentyseventeen_customize_register( $wp_customize ) { 'label' => __( 'Page Layout', 'twentyseventeen' ), 'section' => 'theme_options', 'type' => 'radio', - 'description' => __( 'When no sidebar widgets are assigned, you can opt to display all pages with a one column or two column layout. When the two column layout is assigned, the page title is in one column and content is in the other.', 'twentyseventeen' ), + 'description' => __( 'When the two column layout is assigned, the page title is in one column and content is in the other.', 'twentyseventeen' ), 'choices' => array( 'one-column' => __( 'One Column', 'twentyseventeen' ), 'two-column' => __( 'Two Column', 'twentyseventeen' ), ), - 'active_callback' => 'twentyseventeen_is_page_without_sidebar', + 'active_callback' => 'twentyseventeen_is_view_with_layout_option', ) ); /** @@ -184,10 +184,11 @@ function twentyseventeen_is_static_front_page() { } /** - * Return whether we're previewing a page and there are no widgets in the sidebar. + * Return whether we're on a view that supports a one or two column layout. */ -function twentyseventeen_is_page_without_sidebar() { - return ( is_page() && ! is_active_sidebar( 'sidebar-1' ) ); +function twentyseventeen_is_view_with_layout_option() { + // This option is available on all pages. It's also available on archives when there isn't a sidebar. + return ( is_page() || ( is_archive() && ! is_active_sidebar( 'sidebar-1' ) ) ); } /** diff --git a/src/wp-content/themes/twentyseventeen/inc/template-functions.php b/src/wp-content/themes/twentyseventeen/inc/template-functions.php index 339c8c8e4c..4479f3788a 100644 --- a/src/wp-content/themes/twentyseventeen/inc/template-functions.php +++ b/src/wp-content/themes/twentyseventeen/inc/template-functions.php @@ -45,7 +45,7 @@ function twentyseventeen_body_classes( $classes ) { } // Add class for one or two column page layouts. - if ( is_page() ) { + if ( is_page() || is_archive() ) { if ( 'one-column' === get_theme_mod( 'page_layout' ) ) { $classes[] = 'page-one-column'; } else { diff --git a/src/wp-content/themes/twentyseventeen/rtl.css b/src/wp-content/themes/twentyseventeen/rtl.css index ec91141e74..30c4188bcb 100644 --- a/src/wp-content/themes/twentyseventeen/rtl.css +++ b/src/wp-content/themes/twentyseventeen/rtl.css @@ -381,18 +381,19 @@ input[type="checkbox"] { right: -2.5em; } - body:not(.has-sidebar) .page-header, + body:not(.has-sidebar):not(.page-one-column) .page-header, body.has-sidebar.error404 #primary .page-header, - body.page-two-column #primary .entry-header { + body.page-two-column:not(.archive) #primary .entry-header, + body.page-two-column.archive:not(.has-sidebar) #primary .page-header { float: right; } .blog:not(.has-sidebar) #primary article, - .archive:not(.has-sidebar) #primary article, + .archive:not(.has-sidebar):not(.page-one-column) #primary article, .search:not(.has-sidebar) #primary article, .has-sidebar.error404 #primary .page-content, .error404.has-sidebar #primary .page-content, - body.page-two-column #primary .entry-content, + body.page-two-column:not(.archive) #primary .entry-content, body.page-two-column #comments { float: left; } @@ -451,7 +452,8 @@ input[type="checkbox"] { float: left; } - .has-sidebar .navigation.pagination { + .has-sidebar .navigation.pagination, + .archive.page-one-column:not(.has-sidebar) .navigation.pagination { float: none; } diff --git a/src/wp-content/themes/twentyseventeen/style.css b/src/wp-content/themes/twentyseventeen/style.css index 1419365961..b3c1330e58 100644 --- a/src/wp-content/themes/twentyseventeen/style.css +++ b/src/wp-content/themes/twentyseventeen/style.css @@ -2023,7 +2023,9 @@ body:not(.twentyseventeen-front-page) .entry-header { /* Single Post */ .single-post:not(.has-sidebar) #primary, -.page.page-one-column:not(.twentyseventeen-front-page) #primary { +.page.page-one-column:not(.twentyseventeen-front-page) #primary, +.archive.page-one-column:not(.has-sidebar) .page-header, +.archive.page-one-column:not(.has-sidebar) #primary { margin-left: auto; margin-right: auto; max-width: 740px; @@ -3664,19 +3666,20 @@ object { width: 32px; } - body:not(.has-sidebar) .page-header, + body:not(.has-sidebar):not(.page-one-column) .page-header, body.has-sidebar.error404 #primary .page-header, - body.page-two-column #primary .entry-header { + body.page-two-column:not(.archive) #primary .entry-header, + body.page-two-column.archive:not(.has-sidebar) #primary .page-header { float: left; width: 36%; } .blog:not(.has-sidebar) #primary article, - .archive:not(.has-sidebar) #primary article, + .archive:not(.page-one-column):not(.has-sidebar) #primary article, .search:not(.has-sidebar) #primary article, .error404:not(.has-sidebar) #primary .page-content, .error404.has-sidebar #primary .page-content, - body.page-two-column #primary .entry-content, + body.page-two-column:not(.archive) #primary .entry-content, body.page-two-column #comments { float: right; width: 58%; @@ -3694,7 +3697,8 @@ object { width: 58%; } - .has-sidebar .navigation.pagination { + .has-sidebar .navigation.pagination, + .archive.page-one-column:not(.has-sidebar) .navigation.pagination { float: none; width: 100%; } @@ -3778,7 +3782,9 @@ object { /* Pages */ - .page-one-column .entry-header { + .page.page-one-column .entry-header, + .twentyseventeen-front-page.page-one-column .entry-header, + .archive.page-one-column:not(.has-sidebar) .page-header { margin-bottom: 4em; }