瀏覽代碼

Merge pull request #2961 from Automattic/try/varia-header-footer-hide

Try: Add hide site header/footer Customizer options to Varia
Ben Dwyer 4 年之前
父節點
當前提交
41bcf70535
共有 66 個文件被更改,包括 658 次插入1238 次删除
  1. 0 69
      alves/footer.php
  2. 27 0
      alves/template-parts/footer/footer-content.php
  3. 3 0
      alves/template-parts/footer/footer-info.php
  4. 0 88
      balasana/footer.php
  5. 0 72
      balasana/header.php
  6. 28 0
      balasana/template-parts/footer/footer-content.php
  7. 6 0
      balasana/template-parts/header/fse-header.php
  8. 4 0
      balasana/template-parts/header/header-content.php
  9. 19 0
      balasana/template-parts/header/site-navigation.php
  10. 0 57
      brompton/footer.php
  11. 19 0
      brompton/template-parts/footer/footer-content.php
  12. 0 77
      coutoire/header.php
  13. 3 0
      coutoire/sass/_extra-child-theme.scss
  14. 15 0
      coutoire/style-rtl.css
  15. 15 0
      coutoire/style.css
  16. 5 0
      coutoire/template-parts/header/header-content.php
  17. 0 64
      dalston/footer.php
  18. 0 97
      dalston/header.php
  19. 6 0
      dalston/sass/_extra-child-theme.scss
  20. 19 0
      dalston/style-rtl.css
  21. 19 0
      dalston/style.css
  22. 19 0
      dalston/template-parts/footer/footer-content.php
  23. 6 0
      dalston/template-parts/header/fse-header.php
  24. 13 0
      dalston/template-parts/header/header-content.php
  25. 0 100
      morden/header.php
  26. 15 0
      morden/template-parts/header/header-content.php
  27. 0 67
      rivington/footer.php
  28. 0 80
      rivington/header.php
  29. 18 0
      rivington/template-parts/footer/footer-content.php
  30. 12 0
      rivington/template-parts/header/header-content.php
  31. 24 0
      rivington/template-parts/header/site-navigation.php
  32. 0 74
      rockfield/footer.php
  33. 0 59
      rockfield/header.php
  34. 3 0
      rockfield/sass/_extra-child-theme.scss
  35. 15 0
      rockfield/style-rtl.css
  36. 15 0
      rockfield/style.css
  37. 22 0
      rockfield/template-parts/footer/footer-content.php
  38. 4 0
      rockfield/template-parts/header/header-content.php
  39. 19 0
      rockfield/template-parts/header/site-navigation.php
  40. 1 0
      spearhead/variables.css
  41. 0 90
      stow/header.php
  42. 4 0
      stow/template-parts/header/header-content.php
  43. 0 61
      stratford/footer.php
  44. 0 68
      stratford/header.php
  45. 20 0
      stratford/template-parts/footer/footer-content.php
  46. 9 0
      stratford/template-parts/footer/privacy-policy.php
  47. 6 0
      stratford/template-parts/header/header-content.php
  48. 1 40
      varia/footer.php
  49. 48 0
      varia/functions.php
  50. 9 70
      varia/header.php
  51. 0 4
      varia/inc/style-wpcom.css
  52. 14 0
      varia/inc/template-functions.php
  53. 12 0
      varia/inc/wpcom.php
  54. 1 1
      varia/package-lock.json
  55. 14 0
      varia/sass/components/content/_entry-content.scss
  56. 12 0
      varia/style-rtl.css
  57. 12 0
      varia/style.css
  58. 20 0
      varia/template-parts/footer/footer-content.php
  59. 4 0
      varia/template-parts/footer/footer-info.php
  60. 13 0
      varia/template-parts/footer/footer-navigation.php
  61. 3 0
      varia/template-parts/footer/privacy-policy.php
  62. 12 0
      varia/template-parts/footer/site-name.php
  63. 6 0
      varia/template-parts/header/fse-header.php
  64. 13 0
      varia/template-parts/header/header-content.php
  65. 36 0
      varia/template-parts/header/site-navigation.php
  66. 15 0
      varia/template-parts/header/social-navigation.php

+ 0 - 69
alves/footer.php

@@ -1,69 +0,0 @@
-<?php
-/**
- * The template for displaying the footer
- *
- * Contains the closing of the #content div and all content after.
- *
- * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
- *
- * @package WordPress
- * @subpackage Alves
- * @since 1.0.0
- */
-
-?>
-
-	</div><!-- #content -->
-
-	<?php if ( class_exists( 'A8C\FSE\WP_Template' ) ) : // If the FSE plugin is active, use the Header template for content. ?>
-	<footer class="fse-template-part fse-footer entry-content">
-	<?php
-		$template = new A8C\FSE\WP_Template();
-		$template->output_template_content( A8C\FSE\WP_Template::FOOTER );
-	else : // Otherwise we'll fallback to the default Varia footer below. ?>
-	<footer id="colophon" class="site-footer">
-		<?php get_template_part( 'template-parts/footer/footer', 'widgets' ); ?>
-
-		<div id="footer-info-wrapper">
-
-		<?php
-			if ( function_exists( 'the_privacy_policy_link' ) ) {
-				the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' );
-			}
-		?>
-		<?php if ( has_nav_menu( 'menu-2' ) ) : ?>
-			<nav class="footer-navigation" aria-label="<?php esc_attr_e( 'Footer Menu', 'alves' ); ?>">
-				<?php
-				wp_nav_menu(
-					array(
-						'theme_location' => 'menu-2',
-						'menu_class'     => 'footer-menu',
-						'depth'          => 1,
-					)
-				);
-				?>
-			</nav><!-- .footer-navigation -->
-			<?php endif;
-	endif; ?>
-
-		<div class="site-info">
-				<?php $blog_info = get_bloginfo( 'name' ); ?>
-				<?php if ( ! empty( $blog_info ) ) : ?>
-					<a class="site-name" href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a><span class="comma">,</span>
-				<?php endif; ?>
-				<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'alves' ) ); ?>" class="imprint">
-					<?php
-					/* translators: %s: WordPress. */
-					printf( __( 'proudly powered by %s.', 'alves' ), 'WordPress' );
-					?>
-				</a>
-			</div><!-- .site-info -->
-		</div>
-	</footer><!-- #colophon -->
-
-</div><!-- #page -->
-
-<?php wp_footer(); ?>
-
-</body>
-</html>

+ 27 - 0
alves/template-parts/footer/footer-content.php

@@ -0,0 +1,27 @@
+<?php if ( class_exists( 'A8C\FSE\WP_Template' ) ) : // If the FSE plugin is active, use the Header template for content. ?>
+	<footer class="fse-template-part fse-footer entry-content">
+	<?php
+		$template = new A8C\FSE\WP_Template();
+		$template->output_template_content( A8C\FSE\WP_Template::FOOTER );
+	else : // Otherwise we'll fallback to the default Varia footer below.
+		?>
+	<footer id="colophon" class="site-footer">
+		<?php
+		if ( ! ( true === get_theme_mod( 'hide_site_footer', false ) && is_front_page() && is_page() ) ) : // If this is the homepage and the footer elements are set to hide, don't load this part.
+			get_template_part( 'template-parts/footer/footer', 'widgets' );
+		endif;
+		?>
+
+		<div id="footer-info-wrapper">
+
+		<?php
+		if ( ! ( true === get_theme_mod( 'hide_site_footer', false ) && is_front_page() && is_page() ) ) : // If this is the homepage and the footer elements are set to hide, don't load this part.
+			get_template_part( 'template-parts/footer/privacy-policy', '' );
+			get_template_part( 'template-parts/footer/footer', 'navigation' );
+		endif;
+		get_template_part( 'template-parts/footer/footer', 'info' );
+		?>
+		</div>
+	<?php endif; ?>
+
+	</footer><!-- #colophon -->

+ 3 - 0
alves/template-parts/footer/footer-info.php

@@ -0,0 +1,3 @@
+<div class="site-info">
+	<?php get_template_part( 'template-parts/footer/site', 'name' ); ?>
+</div>

+ 0 - 88
balasana/footer.php

@@ -1,88 +0,0 @@
-<?php
-/**
- * The template for displaying the footer
- *
- * Contains the closing of the #content div and all content after.
- *
- * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
- *
- * @package WordPress
- * @subpackage Varia
- * @since 1.0.0
- */
-
-?>
-
-	</div><!-- #content -->
-
-	<footer id="colophon" class="site-footer responsive-max-width">
-		<?php
-			if ( class_exists( 'A8C\FSE\WP_Template' ) ) : // If the FSE plugin is active, use the Header template for content.
-				$template = new A8C\FSE\WP_Template();
-				$template->output_template_content( A8C\FSE\WP_Template::FOOTER );
-			else : // Otherwise we'll fallback to the default Balasana footer below.
-				get_template_part( 'template-parts/footer/footer', 'widgets' );
-
-				if ( has_nav_menu( 'menu-2' ) || has_nav_menu( 'social' ) ) : ?>
-					<div class="footer-menus">
-
-						<?php if ( has_nav_menu( 'menu-2' ) ) : ?>
-							<nav class="footer-navigation" aria-label="<?php esc_attr_e( 'Footer Menu', 'balasana' ); ?>">
-								<?php
-								wp_nav_menu(
-									array(
-										'theme_location' => 'menu-2',
-										'menu_class'     => 'footer-menu',
-										'depth'          => 1,
-									)
-								);
-								?>
-							</nav><!-- .footer-navigation -->
-						<?php endif;
-
-						if ( has_nav_menu( 'social' ) ) : ?>
-							<nav class="social-navigation" aria-label="<?php esc_attr_e( 'Social Links Menu', 'balasana' ); ?>">
-								<?php
-								wp_nav_menu(
-									array(
-										'theme_location' => 'social',
-										'menu_class'     => 'social-links-menu',
-										'link_before'    => '<span class="screen-reader-text">',
-										'link_after'     => '</span>' . varia_get_icon_svg( 'link' ),
-										'depth'          => 1,
-									)
-								);
-								?>
-							</nav><!-- .social-navigation -->
-						<?php endif; ?>
-
-					</div><!-- .footer-menus -->
-				<?php endif;
-			endif;
-		?>
-
-		<div class="site-info">
-			<?php
-			if ( function_exists( 'the_privacy_policy_link' ) ) {
-				the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' );
-			}
-			?>
-			<?php $blog_info = get_bloginfo( 'name' ); ?>
-			<?php if ( ! empty( $blog_info ) ) : ?>
-				<a class="site-name" href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a><span class="comma">,</span>
-			<?php endif; ?>
-			<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'balasana' ) ); ?>" class="imprint">
-				<?php
-				/* translators: %s: WordPress. */
-				printf( __( 'proudly powered by %s.', 'balasana' ), 'WordPress' );
-				?>
-			</a>
-		</div><!-- .site-info -->
-	</footer><!-- #colophon -->
-
-</div><!-- #page -->
-
-<?php wp_footer(); ?>
-
-</body>
-</html>

+ 0 - 72
balasana/header.php

@@ -1,72 +0,0 @@
-<?php
-/**
- * The header for our theme
- *
- * This is the template that displays all of the <head> section and everything up until <div id="content">
- *
- * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
- *
- * @package WordPress
- * @subpackage Varia
- * @since 1.0.0
- */
-?><!doctype html>
-<html <?php language_attributes(); ?>>
-<head>
-	<meta charset="<?php bloginfo( 'charset' ); ?>" />
-	<meta name="viewport" content="width=device-width, initial-scale=1" />
-	<link rel="profile" href="https://gmpg.org/xfn/11" />
-	<?php wp_head(); ?>
-</head>
-
-<body <?php body_class(); ?>>
-
-<?php
-	if ( function_exists( 'wp_body_open' ) ) {
-		wp_body_open();
-	}
-?>
-	
-<div id="page" class="site">
-	<a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'balasana' ); ?></a>
-
-	<?php if ( class_exists( 'A8C\FSE\WP_Template' ) ) : // If the FSE plugin is active, use the Header template for content. ?>
-
-		<header id="masthead" class="site-header responsive-max-width">
-			<?php
-				$template = new A8C\FSE\WP_Template();
-				$template->output_template_content( A8C\FSE\WP_Template::HEADER );
-			?>
-		</header>
-
-	<?php else : // Otherwise we'll fallback to the default Balasana header below. ?>
-
-		<header id="masthead" class="site-header responsive-max-width">
-
-			<?php get_template_part( 'template-parts/header/site', 'branding' ); ?>
-
-			<?php if ( has_nav_menu( 'menu-1' ) ) : ?>
-				<nav id="site-navigation" class="main-navigation" aria-label="<?php esc_attr_e( 'Main Navigation', 'balasana' ); ?>">
-					<input type="checkbox" role="button" aria-haspopup="true" id="toggle" class="hide-visually">
-					<label for="toggle" id="toggle-menu" class="button">
-						<?php _e( 'Menu', 'balasana' ); ?>
-						<span class="hide-visually expanded-text"><?php _e( 'expanded', 'balasana' ); ?></span>
-						<span class="hide-visually collapsed-text"><?php _e( 'collapsed', 'balasana' ); ?></span>
-					</label>
-					<?php
-					wp_nav_menu(
-						array(
-							'theme_location' => 'menu-1',
-							'menu_class'     => 'main-menu',
-							'items_wrap'     => '<ul id="%1$s" class="%2$s" aria-label="submenu">%3$s</ul>',
-						)
-					);
-					?>
-				</nav><!-- #site-navigation -->
-			<?php endif; ?>
-
-		</header><!-- #masthead -->
-
-	<?php endif; ?>
-
-	<div id="content" class="site-content">

+ 28 - 0
balasana/template-parts/footer/footer-content.php

@@ -0,0 +1,28 @@
+<footer id="colophon" class="site-footer responsive-max-width">
+	<?php
+	if ( class_exists( 'A8C\FSE\WP_Template' ) ) : // If the FSE plugin is active, use the Header template for content.
+		$template = new A8C\FSE\WP_Template();
+		$template->output_template_content( A8C\FSE\WP_Template::FOOTER );
+		else : // Otherwise we'll fallback to the default Balasana footer below.
+
+			if ( ! ( true === get_theme_mod( 'hide_site_footer', false ) && is_front_page() && is_page() ) ) : // If this is the homepage and the footer elements are set to hide, don't load this part.
+
+				get_template_part( 'template-parts/footer/footer', 'widgets' );
+
+				if ( has_nav_menu( 'menu-2' ) || has_nav_menu( 'social' ) ) : ?>
+					<div class="footer-menus">
+						<?php 
+						get_template_part( 'template-parts/footer/footer', 'navigation' );
+						get_template_part( 'template-parts/header/social', 'navigation' ); ?>
+					</div><!-- .footer-menus -->
+					<?php
+				endif;
+			endif;
+		endif;
+		?>
+
+	<div class="site-info">
+		<?php get_template_part( 'template-parts/footer/privacy', 'policy' ); ?>
+		<?php get_template_part( 'template-parts/footer/site', 'name' ); ?>
+	</div><!-- .site-info -->
+</footer><!-- #colophon -->

+ 6 - 0
balasana/template-parts/header/fse-header.php

@@ -0,0 +1,6 @@
+<header id="masthead" class="site-header responsive-max-width">
+	<?php
+		$template = new A8C\FSE\WP_Template();
+		$template->output_template_content( A8C\FSE\WP_Template::HEADER );
+	?>
+</header>

+ 4 - 0
balasana/template-parts/header/header-content.php

@@ -0,0 +1,4 @@
+<header id="masthead" class="site-header responsive-max-width">
+	<?php get_template_part( 'template-parts/header/site', 'branding' ); ?>
+	<?php get_template_part( 'template-parts/header/site', 'navigation' ); ?>
+</header><!-- #masthead -->

+ 19 - 0
balasana/template-parts/header/site-navigation.php

@@ -0,0 +1,19 @@
+<?php if ( has_nav_menu( 'menu-1' ) ) : ?>
+	<nav id="site-navigation" class="main-navigation" aria-label="<?php esc_attr_e( 'Main Navigation', 'balasana' ); ?>">
+		<input type="checkbox" role="button" aria-haspopup="true" id="toggle" class="hide-visually">
+		<label for="toggle" id="toggle-menu" class="button">
+			<?php _e( 'Menu', 'balasana' ); ?>
+			<span class="hide-visually expanded-text"><?php _e( 'expanded', 'balasana' ); ?></span>
+			<span class="hide-visually collapsed-text"><?php _e( 'collapsed', 'balasana' ); ?></span>
+		</label>
+		<?php
+		wp_nav_menu(
+			array(
+				'theme_location' => 'menu-1',
+				'menu_class'     => 'main-menu',
+				'items_wrap'     => '<ul id="%1$s" class="%2$s" aria-label="submenu">%3$s</ul>',
+			)
+		);
+		?>
+	</nav><!-- #site-navigation -->
+<?php endif; ?>

+ 0 - 57
brompton/footer.php

@@ -1,57 +0,0 @@
-<?php
-/**
- * The template for displaying the footer
- *
- * Contains the closing of the #content div and all content after.
- *
- * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
- *
- * @package WordPress
- * @subpackage Varia
- * @since 1.0.0
- */
-
-?>
-
-	</div><!-- #content -->
-
-	<footer id="colophon" class="site-footer">
-		<?php get_template_part( 'template-parts/footer/footer', 'widgets' ); ?>
-		<?php if ( has_nav_menu( 'menu-2' ) ) : ?>
-			<nav class="footer-navigation" aria-label="<?php esc_attr_e( 'Footer Menu', 'varia' ); ?>">
-				<?php
-				wp_nav_menu(
-					array(
-						'theme_location' => 'menu-2',
-						'menu_class'     => 'footer-menu',
-						'depth'          => 1,
-					)
-				);
-				?>
-			</nav><!-- .footer-navigation -->
-		<?php endif; ?>
-		<div class="site-info">
-			<?php $blog_info = get_bloginfo( 'name' ); ?>
-			<?php if ( ! empty( $blog_info ) ) : ?>
-				<a class="site-name" href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a><span class="comma">,</span>
-			<?php endif; ?>
-			<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'varia' ) ); ?>" class="imprint">
-				<?php
-				/* translators: %s: WordPress. */
-				printf( __( 'proudly powered by %s.', 'varia' ), 'WordPress' );
-				?>
-				<?php
-				if ( function_exists( 'the_privacy_policy_link' ) ) {
-					the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' );
-				}
-				?>
-			</a>
-		</div><!-- .site-info -->
-	</footer><!-- #colophon -->
-
-</div><!-- #page -->
-
-<?php wp_footer(); ?>
-
-</body>
-</html>

+ 19 - 0
brompton/template-parts/footer/footer-content.php

@@ -0,0 +1,19 @@
+<?php if ( class_exists( 'A8C\FSE\WP_Template' ) ) : // If the FSE plugin is active, use the Header template for content. ?>
+	<footer class="fse-template-part fse-footer entry-content">
+		<?php
+			$template = new A8C\FSE\WP_Template();
+			$template->output_template_content( A8C\FSE\WP_Template::FOOTER );
+		else : // Otherwise we'll fallback to the default Varia footer below.
+			?>
+
+	<footer id="colophon" class="site-footer">
+			<?php
+			if ( ! ( true === get_theme_mod( 'hide_site_footer', false ) && is_front_page() && is_page() ) ) : // If this is the homepage and the footer elements are set to hide, don't load this part.
+				get_template_part( 'template-parts/footer/footer', 'widgets' );
+				get_template_part( 'template-parts/footer/footer', 'navigation' );
+		endif;
+			?>
+	<?php endif; ?>
+
+		<?php get_template_part( 'template-parts/footer/footer', 'info' ); ?>
+	</footer><!-- #colophon -->

+ 0 - 77
coutoire/header.php

@@ -1,77 +0,0 @@
-<?php
-/**
- * The header for our theme
- *
- * This is the template that displays all of the <head> section and everything up until <div id="content">
- *
- * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
- *
- * @package WordPress
- * @subpackage Varia
- * @since 1.0.0
- */
-?><!doctype html>
-<html <?php language_attributes(); ?>>
-<head>
-	<meta charset="<?php bloginfo( 'charset' ); ?>" />
-	<meta name="viewport" content="width=device-width, initial-scale=1" />
-	<link rel="profile" href="https://gmpg.org/xfn/11" />
-	<?php wp_head(); ?>
-</head>
-
-<body <?php body_class(); ?>>
-
-<?php
-	if ( function_exists( 'wp_body_open' ) ) {
-		wp_body_open();
-	}
-?>
-	
-<div id="page" class="site">
-	<a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'varia' ); ?></a>
-
-		<header id="masthead" class="site-header alignfull">
-
-			<?php get_template_part( 'template-parts/header/site', 'branding' ); ?>
-
-			<?php if ( has_nav_menu( 'menu-1' ) ) : ?>
-				<nav id="site-navigation" class="main-navigation" aria-label="<?php esc_attr_e( 'Main Navigation', 'varia' ); ?>">
-					<input type="checkbox" role="button" aria-haspopup="true" id="toggle" class="hide-visually">
-					<label for="toggle" id="toggle-menu" class="button">
-						<?php _e( 'Menu', 'varia' ); ?>
-						<span class="dropdown-icon open">+</span>
-						<span class="dropdown-icon close">&times;</span>
-						<span class="hide-visually expanded-text"><?php _e( 'expanded', 'varia' ); ?></span>
-						<span class="hide-visually collapsed-text"><?php _e( 'collapsed', 'varia' ); ?></span>
-					</label>
-					<?php
-					wp_nav_menu(
-						array(
-							'theme_location' => 'menu-1',
-							'menu_class'     => 'main-menu',
-							'items_wrap'     => '<ul id="%1$s" class="%2$s" aria-label="submenu">%3$s</ul>',
-						)
-					);
-					?>
-				</nav><!-- #site-navigation -->
-			<?php endif; ?>
-
-			<?php if ( has_nav_menu( 'social' ) ) : ?>
-				<nav class="social-navigation" aria-label="<?php esc_attr_e( 'Social Links Menu', 'varia' ); ?>">
-					<?php
-					wp_nav_menu(
-						array(
-							'theme_location' => 'social',
-							'menu_class'     => 'social-links-menu',
-							'link_before'    => '<span class="screen-reader-text">',
-							'link_after'     => '</span>' . varia_get_icon_svg( 'link' ),
-							'depth'          => 1,
-						)
-					);
-					?>
-				</nav><!-- .social-navigation -->
-			<?php endif; ?>
-
-		</header><!-- #masthead -->
-
-	<div id="content" class="site-content">

+ 3 - 0
coutoire/sass/_extra-child-theme.scss

@@ -311,6 +311,9 @@ a.wp-block-file__button {
 		margin-top: #{10 * $spacing_horizontal};
 		position: relative;
 		z-index: 2;
+		.hide-homepage-header & {
+			margin-top: 0;
+		}
 	}
 
 	.nav-links {

+ 15 - 0
coutoire/style-rtl.css

@@ -3167,6 +3167,18 @@ body:not(.fse-enabled) .footer-menu a {
 	overflow: scroll;
 }
 
+.home.page.hide-homepage-header.hide-homepage-title .entry-content {
+	margin-top: 0;
+	padding-top: 0;
+}
+
+.home.page.hide-homepage-header.hide-homepage-title .entry-content > .wp-block-image.alignfull:first-child,
+.home.page.hide-homepage-header.hide-homepage-title .entry-content > .wp-block-cover.alignfull:first-child,
+.home.page.hide-homepage-header.hide-homepage-title .entry-content > .wp-block-media-text.alignfull:first-child,
+.home.page.hide-homepage-header.hide-homepage-title .entry-content > .wp-block-group.has-background.alignfull:first-child {
+	margin-top: -32px;
+}
+
 .entry-attachment {
 	text-align: center;
 }
@@ -4275,6 +4287,9 @@ a.wp-block-file__button {
 		position: relative;
 		z-index: 2;
 	}
+	.hide-homepage-header .content-area {
+		margin-top: 0;
+	}
 	.nav-links {
 		display: block;
 	}

+ 15 - 0
coutoire/style.css

@@ -3186,6 +3186,18 @@ body:not(.fse-enabled) .footer-menu a {
 	overflow: scroll;
 }
 
+.home.page.hide-homepage-header.hide-homepage-title .entry-content {
+	margin-top: 0;
+	padding-top: 0;
+}
+
+.home.page.hide-homepage-header.hide-homepage-title .entry-content > .wp-block-image.alignfull:first-child,
+.home.page.hide-homepage-header.hide-homepage-title .entry-content > .wp-block-cover.alignfull:first-child,
+.home.page.hide-homepage-header.hide-homepage-title .entry-content > .wp-block-media-text.alignfull:first-child,
+.home.page.hide-homepage-header.hide-homepage-title .entry-content > .wp-block-group.has-background.alignfull:first-child {
+	margin-top: -32px;
+}
+
 .entry-attachment {
 	text-align: center;
 }
@@ -4304,6 +4316,9 @@ a.wp-block-file__button {
 		position: relative;
 		z-index: 2;
 	}
+	.hide-homepage-header .content-area {
+		margin-top: 0;
+	}
 	.nav-links {
 		display: block;
 	}

+ 5 - 0
coutoire/template-parts/header/header-content.php

@@ -0,0 +1,5 @@
+<header id="masthead" class="site-header alignfull">
+	<?php get_template_part( 'template-parts/header/site', 'branding' ); ?>
+	<?php get_template_part( 'template-parts/header/site', 'navigation' ); ?>
+	<?php get_template_part( 'template-parts/header/social', 'navigation' ); ?>
+</header><!-- #masthead -->

+ 0 - 64
dalston/footer.php

@@ -1,64 +0,0 @@
-<?php
-/**
- * The template for displaying the footer
- *
- * Contains the closing of the #content div and all content after.
- *
- * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
- *
- * @package WordPress
- * @subpackage Varia
- * @since 1.0.0
- */
-
-?>
-
-	</div><!-- #content -->
-
-	<footer id="colophon" class="site-footer <?php echo class_exists( 'A8C\FSE\WP_Template' ) ? 'entry-content' : 'responsive-max-width'; ?>">
-		<?php
-			if ( class_exists( 'A8C\FSE\WP_Template' ) ) : // If the FSE plugin is active, use the Header template for content.
-				$template = new A8C\FSE\WP_Template();
-				$template->output_template_content( A8C\FSE\WP_Template::FOOTER );
-			else : // Otherwise we'll fallback to the default Varia footer below.
-				get_template_part( 'template-parts/footer/footer', 'widgets' );
-
-				if ( has_nav_menu( 'menu-2' ) ) : ?>
-					<nav class="footer-navigation" aria-label="<?php esc_attr_e( 'Footer Menu', 'varia' ); ?>">
-						<?php
-						wp_nav_menu(
-							array(
-								'theme_location' => 'menu-2',
-								'menu_class'     => 'footer-menu',
-								'depth'          => 1,
-							)
-						);
-						?>
-					</nav><!-- .footer-navigation -->
-				<?php endif;
-			endif;
-		?>
-
-		<div class="site-info">
-			<?php $blog_info = get_bloginfo( 'name' ); ?>
-			<?php if ( ! empty( $blog_info ) ) : ?>
-				<a class="site-name" href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a><span class="comma">,</span>
-			<?php endif; ?>
-			<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'varia' ) ); ?>" class="imprint">
-				<?php
-				/* translators: %s: WordPress. */
-				printf( __( 'proudly powered by %s.', 'varia' ), 'WordPress' );
-				?>
-			</a>
-			<?php if ( function_exists( 'the_privacy_policy_link' ) ) {
-				the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' );
-			} ?>
-		</div><!-- .site-info -->
-	</footer><!-- #colophon -->
-
-</div><!-- #page -->
-
-<?php wp_footer(); ?>
-
-</body>
-</html>

+ 0 - 97
dalston/header.php

@@ -1,97 +0,0 @@
-<?php
-/**
- * The header for our theme
- *
- * This is the template that displays all of the <head> section and everything up until <div id="content">
- *
- * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
- *
- * @package WordPress
- * @subpackage Varia
- * @since 1.0.0
- */
-$has_primary_nav = has_nav_menu( 'menu-1' );
-$header_classes  = 'site-header';
-$header_classes .= has_custom_logo() ? ' has-logo' : '';
-$header_classes .= 1 === get_theme_mod( 'header_text', 1 ) ? ' has-title-and-tagline' : '';
-$header_classes .= $has_primary_nav ? ' has-menu' : '';
-?><!doctype html>
-<html <?php language_attributes(); ?>>
-<head>
-	<meta charset="<?php bloginfo( 'charset' ); ?>" />
-	<meta name="viewport" content="width=device-width, initial-scale=1" />
-	<link rel="profile" href="https://gmpg.org/xfn/11" />
-	<?php wp_head(); ?>
-</head>
-
-<body <?php body_class(); ?>>
-
-<?php
-	if ( function_exists( 'wp_body_open' ) ) {
-		wp_body_open();
-	}
-?>
-	
-<div id="page" class="site">
-	<a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'varia' ); ?></a>
-
-	<?php if ( class_exists( 'A8C\FSE\WP_Template' ) ) : // If the FSE plugin is active, use the Header template for content. ?>
-
-		<header id="masthead" class="site-header site-branding entry-content">
-			<?php
-				$template = new A8C\FSE\WP_Template();
-				$template->output_template_content( A8C\FSE\WP_Template::HEADER );
-			?>
-		</header>
-
-	<?php else : // Otherwise we'll fallback to the default Varia header below. ?>
-
-		<header id="masthead" class="<?php echo $header_classes; ?>" role="banner" >
-
-			<?php get_template_part( 'template-parts/header/site', 'branding' ); ?>
-
-			<?php if ( $has_primary_nav) : ?>
-				<nav id="site-navigation" class="main-navigation" aria-label="<?php esc_attr_e( 'Main Navigation', 'varia' ); ?>">
-					<input type="checkbox" role="button" aria-haspopup="true" id="toggle" class="hide-visually">
-					<label for="toggle" id="toggle-menu" class="button">
-						<?php _e( 'Menu', 'varia' ); ?>
-						<span class="dropdown-icon open">+</span>
-						<span class="dropdown-icon close">&times;</span>
-						<span class="hide-visually expanded-text"><?php _e( 'expanded', 'varia' ); ?></span>
-						<span class="hide-visually collapsed-text"><?php _e( 'collapsed', 'varia' ); ?></span>
-					</label>
-					<?php
-					 $main_nav_args = array(
-						'theme_location'  => 'menu-1',
-						'menu_class'      => 'main-menu',
-						'items_wrap'      => '<ul id="%1$s" class="%2$s" aria-label="submenu">%3$s</ul>',
-					);
-					if ( get_theme_mod( 'enable_side_menu' ) === 1 ) {
-						$main_nav_args[ 'container_class' ] = 'main-menu-container';
-					}
-					wp_nav_menu( $main_nav_args );
-					?>
-				</nav><!-- #site-navigation -->
-			<?php endif; ?>
-
-			<?php if ( has_nav_menu( 'social' ) ) : ?>
-				<nav class="social-navigation" aria-label="<?php esc_attr_e( 'Social Links Menu', 'varia' ); ?>">
-					<?php
-					wp_nav_menu(
-						array(
-							'theme_location' => 'social',
-							'menu_class'     => 'social-links-menu',
-							'link_before'    => '<span class="screen-reader-text">',
-							'link_after'     => '</span>' . varia_get_icon_svg( 'link' ),
-							'depth'          => 1,
-						)
-					);
-					?>
-				</nav><!-- .social-navigation -->
-			<?php endif; ?>
-
-		</header><!-- #masthead -->
-
-	<?php endif; ?>
-
-	<div id="content" class="site-content">

+ 6 - 0
dalston/sass/_extra-child-theme.scss

@@ -216,11 +216,17 @@ a {
 .site-main > article > .entry-header {
 	margin: #{3 * $spacing_unit} 0 $spacing_unit;
 	position: relative;
+	.hide-homepage-header & {
+		margin: $spacing_unit 0 $spacing_unit;		
+	}
 }
 
 @include media(mobile) {
 	.site-main > article > .entry-header {
 		margin: #{3 * $spacing_vertical} auto #{2 * $spacing_unit};
+		.hide-homepage-header & {
+			margin: #{2 * $spacing_unit} auto #{2 * $spacing_unit};			
+		}
 	}
 }
 

+ 19 - 0
dalston/style-rtl.css

@@ -3169,6 +3169,18 @@ body:not(.fse-enabled) .footer-menu a {
 	overflow: scroll;
 }
 
+.home.page.hide-homepage-header.hide-homepage-title .entry-content {
+	margin-top: 0;
+	padding-top: 0;
+}
+
+.home.page.hide-homepage-header.hide-homepage-title .entry-content > .wp-block-image.alignfull:first-child,
+.home.page.hide-homepage-header.hide-homepage-title .entry-content > .wp-block-cover.alignfull:first-child,
+.home.page.hide-homepage-header.hide-homepage-title .entry-content > .wp-block-media-text.alignfull:first-child,
+.home.page.hide-homepage-header.hide-homepage-title .entry-content > .wp-block-group.has-background.alignfull:first-child {
+	margin-top: -32px;
+}
+
 .entry-attachment {
 	text-align: center;
 }
@@ -4176,10 +4188,17 @@ a {
 	position: relative;
 }
 
+.hide-homepage-header .site-main > article > .entry-header {
+	margin: 16px 0 16px;
+}
+
 @media only screen and (min-width: 560px) {
 	.site-main > article > .entry-header {
 		margin: 96px auto 32px;
 	}
+	.hide-homepage-header .site-main > article > .entry-header {
+		margin: 32px auto 32px;
+	}
 }
 
 .site-main .page-header {

+ 19 - 0
dalston/style.css

@@ -3188,6 +3188,18 @@ body:not(.fse-enabled) .footer-menu a {
 	overflow: scroll;
 }
 
+.home.page.hide-homepage-header.hide-homepage-title .entry-content {
+	margin-top: 0;
+	padding-top: 0;
+}
+
+.home.page.hide-homepage-header.hide-homepage-title .entry-content > .wp-block-image.alignfull:first-child,
+.home.page.hide-homepage-header.hide-homepage-title .entry-content > .wp-block-cover.alignfull:first-child,
+.home.page.hide-homepage-header.hide-homepage-title .entry-content > .wp-block-media-text.alignfull:first-child,
+.home.page.hide-homepage-header.hide-homepage-title .entry-content > .wp-block-group.has-background.alignfull:first-child {
+	margin-top: -32px;
+}
+
 .entry-attachment {
 	text-align: center;
 }
@@ -4205,10 +4217,17 @@ a {
 	position: relative;
 }
 
+.hide-homepage-header .site-main > article > .entry-header {
+	margin: 16px 0 16px;
+}
+
 @media only screen and (min-width: 560px) {
 	.site-main > article > .entry-header {
 		margin: 96px auto 32px;
 	}
+	.hide-homepage-header .site-main > article > .entry-header {
+		margin: 32px auto 32px;
+	}
 }
 
 .site-main .page-header {

+ 19 - 0
dalston/template-parts/footer/footer-content.php

@@ -0,0 +1,19 @@
+<?php if ( class_exists( 'A8C\FSE\WP_Template' ) ) : // If the FSE plugin is active, use the Header template for content. ?>
+	<footer class="fse-template-part fse-footer entry-content">
+		<?php
+			$template = new A8C\FSE\WP_Template();
+			$template->output_template_content( A8C\FSE\WP_Template::FOOTER );
+		else : // Otherwise we'll fallback to the default Varia footer below.
+			?>
+
+	<footer id="colophon" class="site-footer responsive-max-width">
+			<?php
+			if ( ! ( true === get_theme_mod( 'hide_site_footer', false ) && is_front_page() && is_page() ) ) : // If this is the homepage and the footer elements are set to hide, don't load this part.
+				get_template_part( 'template-parts/footer/footer', 'widgets' );
+				get_template_part( 'template-parts/footer/footer', 'navigation' );
+		endif;
+			?>
+	<?php endif; ?>
+
+		<?php get_template_part( 'template-parts/footer/footer', 'info' ); ?>
+	</footer><!-- #colophon -->

+ 6 - 0
dalston/template-parts/header/fse-header.php

@@ -0,0 +1,6 @@
+<header id="masthead" class="site-header site-branding entry-content">
+	<?php
+		$template = new A8C\FSE\WP_Template();
+		$template->output_template_content( A8C\FSE\WP_Template::HEADER );
+	?>
+</header>

+ 13 - 0
dalston/template-parts/header/header-content.php

@@ -0,0 +1,13 @@
+<?php
+$has_primary_nav = has_nav_menu( 'menu-1' );
+$header_classes  = 'site-header';
+$header_classes .= has_custom_logo() ? ' has-logo' : '';
+$header_classes .= 1 === get_theme_mod( 'header_text', 1 ) ? ' has-title-and-tagline' : '';
+$header_classes .= $has_primary_nav ? ' has-menu' : '';
+?>
+
+<header id="masthead" class="<?php echo $header_classes; ?>" role="banner">
+	<?php get_template_part( 'template-parts/header/site', 'branding' ); ?>
+	<?php get_template_part( 'template-parts/header/site', 'navigation' ); ?>
+	<?php get_template_part( 'template-parts/header/social', 'navigation' ); ?>
+</header><!-- #masthead -->

+ 0 - 100
morden/header.php

@@ -1,100 +0,0 @@
-<?php
-/**
- * The header for our theme
- *
- * This is the template that displays all of the <head> section and everything up until <div id="content">
- *
- * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
- *
- * @package WordPress
- * @subpackage Varia
- * @since 1.0.0
- */
-$has_primary_nav = has_nav_menu( 'menu-1' );
-$header_classes  = 'site-header-wrap responsive-max-width';
-$header_classes .= has_custom_logo() ? ' has-logo' : '';
-$header_classes .= 1 === get_theme_mod( 'header_text', 1 ) ? ' has-title-and-tagline' : '';
-$header_classes .= $has_primary_nav ? ' has-menu' : '';
-?><!doctype html>
-<html <?php language_attributes(); ?>>
-<head>
-	<meta charset="<?php bloginfo( 'charset' ); ?>" />
-	<meta name="viewport" content="width=device-width, initial-scale=1" />
-	<link rel="profile" href="https://gmpg.org/xfn/11" />
-	<?php wp_head(); ?>
-</head>
-
-<body <?php body_class(); ?>>
-
-<?php
-if ( function_exists( 'wp_body_open' ) ) {
-	wp_body_open();
-}
-?>
-
-<div id="page" class="site">
-	<a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'varia' ); ?></a>
-
-	<?php if ( class_exists( 'A8C\FSE\WP_Template' ) ) : // If the FSE plugin is active, use the Header template for content. ?>
-
-		<header id="masthead" class="fse-template-part fse-header entry-content">
-			<?php
-				$template = new A8C\FSE\WP_Template();
-				$template->output_template_content( A8C\FSE\WP_Template::HEADER );
-			?>
-		</header>
-
-	<?php else : // Otherwise we'll fallback to the default Varia header below. ?>
-		<header id="masthead" class="site-header" role="banner">
-			<div class="<?php echo $header_classes; ?>">
-				<?php get_template_part( 'template-parts/header/site', 'branding' ); ?>
-
-				<?php if ( $has_primary_nav ) : ?>
-					<nav id="site-navigation" class="main-navigation" aria-label="<?php esc_attr_e( 'Main Navigation', 'varia' ); ?>">
-
-						<input type="checkbox" role="button" aria-haspopup="true" id="toggle" class="hide-visually">
-						<label for="toggle" id="toggle-menu" class="button">
-							<?php _e( 'Menu', 'varia' ); ?>
-							<span class="dropdown-icon open">+</span>
-							<span class="dropdown-icon close">&times;</span>
-							<span class="hide-visually expanded-text"><?php _e( 'expanded', 'varia' ); ?></span>
-							<span class="hide-visually collapsed-text"><?php _e( 'collapsed', 'varia' ); ?></span>
-						</label>
-
-						<?php
-						$main_nav_args = array(
-							'theme_location'  => 'menu-1',
-							'menu_class'      => 'main-menu',
-							'items_wrap'      => '<ul id="%1$s" class="%2$s" aria-label="submenu">%3$s</ul>',
-						);
-						if ( get_theme_mod( 'enable_side_menu' ) === 1 ) {
-							$main_nav_args[ 'container_class' ] = 'main-menu-container';
-						}
-						wp_nav_menu( $main_nav_args );
-						?>
-					</nav><!-- #site-navigation -->
-				<?php endif; ?>
-
-				<?php if ( has_nav_menu( 'social' ) ) : ?>
-					<nav class="social-navigation" role="navigation" aria-label="<?php esc_attr_e( 'Social Links Menu', 'varia' ); ?>">
-						<?php
-						wp_nav_menu(
-							array(
-								'theme_location' => 'social',
-								'menu_class'     => 'social-links-menu',
-								'link_before'    => '<span class="screen-reader-text">',
-								'link_after'     => '</span>' . varia_get_icon_svg( 'link' ),
-								'depth'          => 1,
-							)
-						);
-						?>
-					</nav><!-- .social-navigation -->
-				<?php endif; ?>
-
-			</div><!-- .site-header-wrap -->
-
-		</header><!-- #masthead -->
-
-	<?php endif; ?>
-
-	<div id="content" class="site-content">

+ 15 - 0
morden/template-parts/header/header-content.php

@@ -0,0 +1,15 @@
+<?php
+$has_primary_nav = has_nav_menu( 'menu-1' );
+$header_classes  = 'site-header-wrap responsive-max-width';
+$header_classes .= has_custom_logo() ? ' has-logo' : '';
+$header_classes .= 1 === get_theme_mod( 'header_text', 1 ) ? ' has-title-and-tagline' : '';
+$header_classes .= $has_primary_nav ? ' has-menu' : '';
+?>
+
+<header id="masthead" class="site-header" role="banner">
+	<div class="<?php echo $header_classes; ?>">
+		<?php get_template_part( 'template-parts/header/site', 'branding' ); ?>
+		<?php get_template_part( 'template-parts/header/site', 'navigation' ); ?>
+		<?php get_template_part( 'template-parts/header/social', 'navigation' ); ?>
+	</div><!-- .site-header-wrap -->
+</header><!-- #masthead -->

+ 0 - 67
rivington/footer.php

@@ -1,67 +0,0 @@
-<?php
-/**
- * The template for displaying the footer
- *
- * Contains the closing of the #content div and all content after.
- *
- * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
- *
- * @package WordPress
- * @subpackage Rivington
- * @since 1.0.0
- */
-
-?>
-
-	</div><!-- #content -->
-
-	<footer id="colophon" class="site-footer responsive-max-width">
-		<?php
-			if ( class_exists( 'A8C\FSE\WP_Template' ) ) : // If the FSE plugin is active, use the Header template for content.
-				$template = new A8C\FSE\WP_Template();
-				$template->output_template_content( A8C\FSE\WP_Template::FOOTER );
-			else : // Otherwise we'll fallback to the default footer below.
-				get_template_part( 'template-parts/footer/footer', 'widgets' );
-
-				if ( function_exists( 'the_privacy_policy_link' ) ) {
-					the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' );
-				}
-
-				if ( has_nav_menu( 'social' ) ) : ?>
-					<nav class="social-navigation" aria-label="<?php esc_attr_e( 'Social Links Menu', 'rockfield' ); ?>">
-						<?php
-						wp_nav_menu(
-							array(
-								'theme_location' => 'social',
-								'menu_class'     => 'social-links-menu',
-								'link_before'    => '<span class="screen-reader-text">',
-								'link_after'     => '</span>' . varia_get_icon_svg( 'link' ),
-								'depth'          => 1,
-							)
-						);
-						?>
-					</nav><!-- .social-navigation -->
-				<?php endif;
-			endif;
-		?>
-
-		<div class="site-info">
-			<?php $blog_info = get_bloginfo( 'name' ); ?>
-			<?php if ( ! empty( $blog_info ) ) : ?>
-				<a class="site-name" href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a><span class="comma">,</span>
-			<?php endif; ?>
-			<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'rivington' ) ); ?>" class="imprint">
-				<?php
-				/* translators: %s: WordPress. */
-				printf( __( 'proudly powered by %s.', 'rivington' ), 'WordPress' );
-				?>
-			</a>
-		</div><!-- .site-info -->
-	</footer><!-- #colophon -->
-
-</div><!-- #page -->
-
-<?php wp_footer(); ?>
-
-</body>
-</html>

+ 0 - 80
rivington/header.php

@@ -1,80 +0,0 @@
-<?php
-/**
- * The header for our theme
- *
- * This is the template that displays all of the <head> section and everything up until <div id="content">
- *
- * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
- *
- * @package WordPress
- * @subpackage Rivington
- * @since 1.0.0
- */
-
-$has_primary_nav = has_nav_menu( 'menu-1' );
-$header_classes  = 'site-header responsive-max-width';
-$header_classes .= has_custom_logo() ? ' has-logo' : '';
-$header_classes .= 1 === get_theme_mod( 'header_text', 1 ) ? ' has-title-and-tagline' : '';
-$header_classes .= $has_primary_nav ? ' has-menu' : '';
-?><!doctype html>
-<html <?php language_attributes(); ?>>
-<head>
-	<meta charset="<?php bloginfo( 'charset' ); ?>" />
-	<meta name="viewport" content="width=device-width, initial-scale=1" />
-	<link rel="profile" href="https://gmpg.org/xfn/11" />
-	<?php wp_head(); ?>
-</head>
-
-<body <?php body_class(); ?>>
-
-<?php
-	if ( function_exists( 'wp_body_open' ) ) {
-		wp_body_open();
-	}
-?>
-	
-<div id="page" class="site">
-	<a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'rivington' ); ?></a>
-
-	<?php if ( class_exists( 'A8C\FSE\WP_Template' ) ) : // If the FSE plugin is active, use the Header template for content. ?>
-
-		<header id="masthead" class="site-header responsive-max-width">
-			<?php
-				$template = new A8C\FSE\WP_Template();
-				$template->output_template_content( A8C\FSE\WP_Template::HEADER );
-			?>
-		</header>
-
-	<?php else : // Otherwise we'll fallback to the default header below. ?>
-
-		<header id="masthead" class="<?php echo $header_classes; ?>" role="banner">
-			<?php get_template_part( 'template-parts/header/site', 'branding' ); ?>
-
-			<?php if ( $has_primary_nav ) : ?>
-				<nav id="site-navigation" class="main-navigation" aria-label="<?php esc_attr_e( 'Main Navigation', 'rivington' ); ?>">
-					<input type="checkbox" role="button" aria-haspopup="true" id="toggle" class="hide-visually">
-					<label for="toggle" id="toggle-menu" class="button">
-						<?php _e( 'Menu', 'rivington' ); ?>
-						<span class="dropdown-icon open">+</span>
-						<span class="dropdown-icon close">&times;</span>
-						<span class="hide-visually expanded-text"><?php _e( 'expanded', 'rivington' ); ?></span>
-						<span class="hide-visually collapsed-text"><?php _e( 'collapsed', 'rivington' ); ?></span>
-					</label>
-					<?php
-					wp_nav_menu(
-						array(
-							'container_class' => 'main-menu-container',
-							'theme_location'  => 'menu-1',
-							'menu_class'      => 'main-menu',
-							'items_wrap'      => '<ul id="%1$s" class="%2$s" aria-label="submenu">%3$s</ul>',
-						)
-					);
-					?>
-				</nav><!-- #site-navigation -->
-			<?php endif; ?>
-
-		</header><!-- #masthead -->
-
-	<?php endif; ?>
-
-	<div id="content" class="site-content">

+ 18 - 0
rivington/template-parts/footer/footer-content.php

@@ -0,0 +1,18 @@
+<footer id="colophon" class="site-footer responsive-max-width">
+	<?php
+	if ( class_exists( 'A8C\FSE\WP_Template' ) ) : // If the FSE plugin is active, use the Header template for content.
+		$template = new A8C\FSE\WP_Template();
+		$template->output_template_content( A8C\FSE\WP_Template::FOOTER );
+		else : // Otherwise we'll fallback to the default footer below.
+			if ( ! ( true === get_theme_mod( 'hide_site_footer', false ) && is_front_page() && is_page() ) ) : // If this is the homepage and the footer elements are set to hide, don't load this part.
+				get_template_part( 'template-parts/footer/footer', 'widgets' );
+				get_template_part( 'template-parts/footer/privacy', 'policy' );
+				get_template_part( 'template-parts/header/social', 'navigation' ); 
+			endif;
+		endif;
+		?>
+
+	<div class="site-info">
+		<?php get_template_part( 'template-parts/footer/site', 'name' ); ?>
+	</div><!-- .site-info -->
+</footer><!-- #colophon -->

+ 12 - 0
rivington/template-parts/header/header-content.php

@@ -0,0 +1,12 @@
+<?php
+$has_primary_nav = has_nav_menu( 'menu-1' );
+$header_classes  = 'site-header responsive-max-width';
+$header_classes .= has_custom_logo() ? ' has-logo' : '';
+$header_classes .= 1 === get_theme_mod( 'header_text', 1 ) ? ' has-title-and-tagline' : '';
+$header_classes .= $has_primary_nav ? ' has-menu' : '';
+?>
+
+<header id="masthead" class="<?php echo $header_classes; ?>" role="banner">
+	<?php get_template_part( 'template-parts/header/site', 'branding' ); ?>
+	<?php get_template_part( 'template-parts/header/site', 'navigation' ); ?>
+</header><!-- #masthead -->

+ 24 - 0
rivington/template-parts/header/site-navigation.php

@@ -0,0 +1,24 @@
+<?php 
+$has_primary_nav = has_nav_menu( 'menu-1' );
+if ( $has_primary_nav ) : ?>
+	<nav id="site-navigation" class="main-navigation" aria-label="<?php esc_attr_e( 'Main Navigation', 'rivington' ); ?>">
+		<input type="checkbox" role="button" aria-haspopup="true" id="toggle" class="hide-visually">
+		<label for="toggle" id="toggle-menu" class="button">
+			<?php _e( 'Menu', 'rivington' ); ?>
+			<span class="dropdown-icon open">+</span>
+			<span class="dropdown-icon close">&times;</span>
+			<span class="hide-visually expanded-text"><?php _e( 'expanded', 'rivington' ); ?></span>
+			<span class="hide-visually collapsed-text"><?php _e( 'collapsed', 'rivington' ); ?></span>
+		</label>
+		<?php
+		wp_nav_menu(
+			array(
+				'container_class' => 'main-menu-container',
+				'theme_location'  => 'menu-1',
+				'menu_class'      => 'main-menu',
+				'items_wrap'      => '<ul id="%1$s" class="%2$s" aria-label="submenu">%3$s</ul>',
+			)
+		);
+		?>
+	</nav><!-- #site-navigation -->
+<?php endif; ?>

+ 0 - 74
rockfield/footer.php

@@ -1,74 +0,0 @@
-<?php
-/**
- * The template for displaying the footer
- *
- * Contains the closing of the #content div and all content after.
- *
- * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
- *
- * @package WordPress
- * @subpackage Varia
- * @since 1.0.0
- */
-
-?>
-
-	</div><!-- #content -->
-
-	<footer id="colophon" class="site-footer">
-		<?php get_template_part( 'template-parts/footer/footer', 'widgets' ); ?>
-		<?php
-		if ( function_exists( 'the_privacy_policy_link' ) ) {
-			the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' );
-		}
-		?>
-
-    <?php if ( has_nav_menu( 'social' ) ) : ?>
-      <nav class="social-navigation" aria-label="<?php esc_attr_e( 'Social Links Menu', 'rockfield' ); ?>">
-        <?php
-        wp_nav_menu(
-          array(
-            'theme_location' => 'social',
-            'menu_class'     => 'social-links-menu',
-            'link_before'    => '<span class="screen-reader-text">',
-            'link_after'     => '</span>' . varia_get_icon_svg( 'link' ),
-            'depth'          => 1,
-          )
-        );
-        ?>
-      </nav><!-- .social-navigation -->
-    <?php endif; ?>
-
-		<?php if ( has_nav_menu( 'menu-2' ) ) : ?>
-			<nav class="footer-navigation" aria-label="<?php esc_attr_e( 'Footer Menu', 'rockfield' ); ?>">
-				<?php
-				wp_nav_menu(
-					array(
-						'theme_location' => 'menu-2',
-						'menu_class'     => 'footer-menu',
-						'depth'          => 1,
-					)
-				);
-				?>
-			</nav><!-- .footer-navigation -->
-		<?php endif; ?>
-		<div class="site-info">
-			<?php $blog_info = get_bloginfo( 'name' ); ?>
-			<?php if ( ! empty( $blog_info ) ) : ?>
-				<a class="site-name" href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a><span class="comma">,</span>
-			<?php endif; ?>
-			<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'rockfield' ) ); ?>" class="imprint">
-				<?php
-				/* translators: %s: WordPress. */
-				printf( __( 'proudly powered by %s.', 'rockfield' ), 'WordPress' );
-				?>
-			</a>
-		</div><!-- .site-info -->
-	</footer><!-- #colophon -->
-
-</div><!-- #page -->
-
-<?php wp_footer(); ?>
-
-</body>
-</html>

+ 0 - 59
rockfield/header.php

@@ -1,59 +0,0 @@
-<?php
-/**
- * The header for our theme
- *
- * This is the template that displays all of the <head> section and everything up until <div id="content">
- *
- * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
- *
- * @package WordPress
- * @subpackage Varia
- * @since 1.0.0
- */
-?><!doctype html>
-<html <?php language_attributes(); ?>>
-<head>
-	<meta charset="<?php bloginfo( 'charset' ); ?>" />
-	<meta name="viewport" content="width=device-width, initial-scale=1" />
-	<link rel="profile" href="https://gmpg.org/xfn/11" />
-	<?php wp_head(); ?>
-</head>
-
-<body <?php body_class(); ?>>
-
-<?php
-	if ( function_exists( 'wp_body_open' ) ) {
-		wp_body_open();
-	}
-?>
-	
-<div id="page" class="site">
-	<a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'rockfield' ); ?></a>
-
-		<header id="masthead" class="site-header">
-
-			<?php get_template_part( 'template-parts/header/site', 'branding' ); ?>
-
-			<?php if ( has_nav_menu( 'menu-1' ) ) : ?>
-				<nav id="site-navigation" class="main-navigation" aria-label="<?php esc_attr_e( 'Main Navigation', 'rockfield' ); ?>">
-					<input type="checkbox" role="button" aria-haspopup="true" id="toggle" class="hide-visually">
-					<label for="toggle" id="toggle-menu" class="button">
-						<?php _e( 'Menu', 'rockfield' ); ?>
-						<span class="hide-visually expanded-text"><?php _e( 'expanded', 'rockfield' ); ?></span>
-						<span class="hide-visually collapsed-text"><?php _e( 'collapsed', 'rockfield' ); ?></span>
-					</label>
-					<?php
-					wp_nav_menu(
-						array(
-							'theme_location' => 'menu-1',
-							'menu_class'     => 'main-menu',
-							'items_wrap'     => '<ul id="%1$s" class="%2$s" aria-label="submenu">%3$s</ul>',
-						)
-					);
-					?>
-				</nav><!-- #site-navigation -->
-			<?php endif; ?>
-
-		</header><!-- #masthead -->
-
-	<div id="content" class="site-content">

+ 3 - 0
rockfield/sass/_extra-child-theme.scss

@@ -229,6 +229,9 @@ a {
 @include media(mobile) {
 	#main {
 		padding-top: #{2 * map-deep-get($config-global, "spacing", "vertical")};
+		.hide-homepage-header & {
+			padding-top: 0;
+		}
 	}
 }
 

+ 15 - 0
rockfield/style-rtl.css

@@ -3169,6 +3169,18 @@ body:not(.fse-enabled) .footer-menu a {
 	overflow: scroll;
 }
 
+.home.page.hide-homepage-header.hide-homepage-title .entry-content {
+	margin-top: 0;
+	padding-top: 0;
+}
+
+.home.page.hide-homepage-header.hide-homepage-title .entry-content > .wp-block-image.alignfull:first-child,
+.home.page.hide-homepage-header.hide-homepage-title .entry-content > .wp-block-cover.alignfull:first-child,
+.home.page.hide-homepage-header.hide-homepage-title .entry-content > .wp-block-media-text.alignfull:first-child,
+.home.page.hide-homepage-header.hide-homepage-title .entry-content > .wp-block-group.has-background.alignfull:first-child {
+	margin-top: -32px;
+}
+
 .entry-attachment {
 	text-align: center;
 }
@@ -4220,6 +4232,9 @@ p:not(.site-title) a:hover {
 	#main {
 		padding-top: 64px;
 	}
+	.hide-homepage-header #main {
+		padding-top: 0;
+	}
 }
 
 @media only screen and (min-width: 640px) {

+ 15 - 0
rockfield/style.css

@@ -3188,6 +3188,18 @@ body:not(.fse-enabled) .footer-menu a {
 	overflow: scroll;
 }
 
+.home.page.hide-homepage-header.hide-homepage-title .entry-content {
+	margin-top: 0;
+	padding-top: 0;
+}
+
+.home.page.hide-homepage-header.hide-homepage-title .entry-content > .wp-block-image.alignfull:first-child,
+.home.page.hide-homepage-header.hide-homepage-title .entry-content > .wp-block-cover.alignfull:first-child,
+.home.page.hide-homepage-header.hide-homepage-title .entry-content > .wp-block-media-text.alignfull:first-child,
+.home.page.hide-homepage-header.hide-homepage-title .entry-content > .wp-block-group.has-background.alignfull:first-child {
+	margin-top: -32px;
+}
+
 .entry-attachment {
 	text-align: center;
 }
@@ -4249,6 +4261,9 @@ p:not(.site-title) a:hover {
 	#main {
 		padding-top: 64px;
 	}
+	.hide-homepage-header #main {
+		padding-top: 0;
+	}
 }
 
 @media only screen and (min-width: 640px) {

+ 22 - 0
rockfield/template-parts/footer/footer-content.php

@@ -0,0 +1,22 @@
+<?php if ( class_exists( 'A8C\FSE\WP_Template' ) ) : // If the FSE plugin is active, use the Header template for content. ?>
+	<footer class="fse-template-part fse-footer entry-content">
+	<?php
+		$template = new A8C\FSE\WP_Template();
+		$template->output_template_content( A8C\FSE\WP_Template::FOOTER );
+	else : // Otherwise we'll fallback to the default Varia footer below.
+		?>
+	<footer id="colophon" class="site-footer">
+
+		<?php
+			if ( ! ( true === get_theme_mod( 'hide_site_footer', false ) && is_front_page() && is_page() ) ) : // If this is the homepage and the footer elements are set to hide, don't load this part.
+				get_template_part( 'template-parts/footer/footer', 'widgets' );
+				get_template_part( 'template-parts/footer/privacy', 'policy' );
+				get_template_part( 'template-parts/header/social', 'navigation' );
+				get_template_part( 'template-parts/footer/footer', 'navigation' );
+			endif;
+			?>
+	<?php endif; ?>
+	<div class="site-info">
+		<?php get_template_part( 'template-parts/footer/site', 'name' ); ?>
+	</div><!-- .site-info -->
+</footer><!-- #colophon -->

+ 4 - 0
rockfield/template-parts/header/header-content.php

@@ -0,0 +1,4 @@
+<header id="masthead" class="site-header">
+	<?php get_template_part( 'template-parts/header/site', 'branding' ); ?>
+	<?php get_template_part( 'template-parts/header/site', 'navigation' ); ?>
+</header><!-- #masthead -->

+ 19 - 0
rockfield/template-parts/header/site-navigation.php

@@ -0,0 +1,19 @@
+<?php if ( has_nav_menu( 'menu-1' ) ) : ?>
+	<nav id="site-navigation" class="main-navigation" aria-label="<?php esc_attr_e( 'Main Navigation', 'rockfield' ); ?>">
+		<input type="checkbox" role="button" aria-haspopup="true" id="toggle" class="hide-visually">
+		<label for="toggle" id="toggle-menu" class="button">
+			<?php _e( 'Menu', 'rockfield' ); ?>
+			<span class="hide-visually expanded-text"><?php _e( 'expanded', 'rockfield' ); ?></span>
+			<span class="hide-visually collapsed-text"><?php _e( 'collapsed', 'rockfield' ); ?></span>
+		</label>
+		<?php
+		wp_nav_menu(
+			array(
+				'theme_location' => 'menu-1',
+				'menu_class'     => 'main-menu',
+				'items_wrap'     => '<ul id="%1$s" class="%2$s" aria-label="submenu">%3$s</ul>',
+			)
+		);
+		?>
+	</nav><!-- #site-navigation -->
+<?php endif; ?>

+ 1 - 0
spearhead/variables.css

@@ -51,6 +51,7 @@
 
 	--entry-header--font-size: var(--heading--font-size-h1);
 	--entry-header--color: var(--global--color-foreground);
+	--entry-header--color-link: var(--entry-header--color);
 
 	--button--border-radius: 0px;
 	--button--color-text: var(--global--color-background);

+ 0 - 90
stow/header.php

@@ -1,90 +0,0 @@
-<?php
-/**
- * The header for our theme
- *
- * This is the template that displays all of the <head> section and everything up until <div id="content">
- *
- * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
- *
- * @package WordPress
- * @subpackage Varia
- * @since 1.0.0
- */
-?><!doctype html>
-<html <?php language_attributes(); ?>>
-<head>
-	<meta charset="<?php bloginfo( 'charset' ); ?>" />
-	<meta name="viewport" content="width=device-width, initial-scale=1" />
-	<link rel="profile" href="https://gmpg.org/xfn/11" />
-	<?php wp_head(); ?>
-</head>
-
-<body <?php body_class(); ?>>
-
-<?php
-	if ( function_exists( 'wp_body_open' ) ) {
-		wp_body_open();
-	}
-?>
-	
-<div id="page" class="site">
-	<a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'varia' ); ?></a>
-
-	<?php if ( class_exists( 'A8C\FSE\WP_Template' ) ) : // If the FSE plugin is active, use the Header template for content. ?>
-
-		<header id="masthead" class="fse-template-part fse-header entry-content">
-			<?php
-				$template = new A8C\FSE\WP_Template();
-				$template->output_template_content( A8C\FSE\WP_Template::HEADER );
-			?>
-		</header>
-
-	<?php else : // Otherwise we'll fallback to the default Stow header below. ?>
-
-		<header id="masthead" class="site-header">
-
-			<?php get_template_part( 'template-parts/header/site', 'branding' ); ?>
-
-			<?php if ( has_nav_menu( 'menu-1' ) ) : ?>
-				<nav id="site-navigation" class="main-navigation" aria-label="<?php esc_attr_e( 'Main Navigation', 'varia' ); ?>">
-					<input type="checkbox" role="button" aria-haspopup="true" id="toggle" class="hide-visually">
-					<label for="toggle" id="toggle-menu" class="button">
-						<?php _e( 'Menu', 'varia' ); ?>
-						<span class="dropdown-icon open">+</span>
-						<span class="dropdown-icon close">&times;</span>
-						<span class="hide-visually expanded-text"><?php _e( 'expanded', 'varia' ); ?></span>
-						<span class="hide-visually collapsed-text"><?php _e( 'collapsed', 'varia' ); ?></span>
-					</label>
-					<?php
-					wp_nav_menu(
-						array(
-							'theme_location' => 'menu-1',
-							'menu_class'     => 'main-menu',
-							'items_wrap'     => '<ul id="%1$s" class="%2$s" aria-label="submenu">%3$s</ul>',
-						)
-					);
-					?>
-				</nav><!-- #site-navigation -->
-			<?php endif; ?>
-
-			<?php if ( has_nav_menu( 'social' ) ) : ?>
-				<nav class="social-navigation" aria-label="<?php esc_attr_e( 'Social Links Menu', 'varia' ); ?>">
-					<?php
-					wp_nav_menu(
-						array(
-							'theme_location' => 'social',
-							'menu_class'     => 'social-links-menu',
-							'link_before'    => '<span class="screen-reader-text">',
-							'link_after'     => '</span>' . varia_get_icon_svg( 'link' ),
-							'depth'          => 1,
-						)
-					);
-					?>
-				</nav><!-- .social-navigation -->
-			<?php endif; ?>
-
-		</header><!-- #masthead -->
-
-	<?php endif; ?>
-
-	<div id="content" class="site-content">

+ 4 - 0
stow/template-parts/header/header-content.php

@@ -0,0 +1,4 @@
+<header id="masthead" class="site-header">
+	<?php get_template_part( 'template-parts/header/site', 'branding' ); ?>
+	<?php get_template_part( 'template-parts/header/site', 'navigation' ); ?>
+</header><!-- #masthead -->

+ 0 - 61
stratford/footer.php

@@ -1,61 +0,0 @@
-<?php
-/**
- * The template for displaying the footer
- *
- * Contains the closing of the #content div and all content after.
- *
- * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
- *
- * @package WordPress
- * @subpackage Varia
- * @since 1.0.0
- */
-
-?>
-
-	</div><!-- #content -->
-
-	<footer id="colophon" class="site-footer responsive-max-width">
-		<?php get_template_part( 'template-parts/footer/footer', 'widgets' ); ?>
-		<?php if ( has_nav_menu( 'social' ) ) : ?>
-			<nav class="footer-navigation social-navigation" aria-label="<?php esc_attr_e( 'Social Links Menu', 'varia' ); ?>">
-				<?php
-				wp_nav_menu(
-					array(
-						'theme_location' => 'social',
-						'menu_class'     => 'social-links-menu',
-						'link_before'    => '<span class="screen-reader-text">',
-						'link_after'     => '</span>' . varia_get_icon_svg( 'link' ),
-						'depth'          => 1,
-					)
-				);
-				?>
-			</nav><!-- .social-navigation -->
-		<?php endif; ?>
-		<div class="site-info">
-			<?php
-			if ( function_exists( 'the_privacy_policy_link' ) ) { ?>
-				<div class="privacy-policy-container">
-				<?php the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' ); ?>
-				</div><?php 
-			}
-			?>
-			<?php $blog_info = get_bloginfo( 'name' ); ?>
-			<?php if ( ! empty( $blog_info ) ) : ?>
-				<a class="site-name" href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a><span class="comma">,</span>
-			<?php endif; ?>
-			<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'varia' ) ); ?>" class="imprint">
-				<?php
-				/* translators: %s: WordPress. */
-				printf( __( 'proudly powered by %s.', 'varia' ), 'WordPress' );
-				?>
-			</a>
-		</div><!-- .site-info -->
-	</footer><!-- #colophon -->
-
-</div><!-- #page -->
-
-<?php wp_footer(); ?>
-
-</body>
-</html>

+ 0 - 68
stratford/header.php

@@ -1,68 +0,0 @@
-<?php
-/**
- * The header for our theme
- *
- * This is the template that displays all of the <head> section and everything up until <div id="content">
- *
- * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
- *
- * @package WordPress
- * @subpackage Stratford
- * @since 1.0.0
- */
-?><!doctype html>
-<html <?php language_attributes(); ?>>
-<head>
-	<meta charset="<?php bloginfo( 'charset' ); ?>" />
-	<meta name="viewport" content="width=device-width, initial-scale=1" />
-	<link rel="profile" href="https://gmpg.org/xfn/11" />
-	<?php wp_head(); ?>
-</head>
-
-<body <?php body_class(); ?>>
-
-<?php
-	if ( function_exists( 'wp_body_open' ) ) {
-		wp_body_open();
-	}
-?>
-	
-<div id="page" class="site">
-	<a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'varia' ); ?></a>
-
-		<header id="masthead" class="site-header alignfull">
-			
-			<div class="site-header-wrapper">
-				
-				<?php get_template_part( 'template-parts/header/site', 'branding' ); ?>
-			
-				
-				<?php if ( has_nav_menu( 'menu-1' ) ) : ?>
-				<div id="site-menu" class="site-menu">
-					<nav id="site-navigation" class="main-navigation" aria-label="<?php esc_attr_e( 'Main Navigation', 'varia' ); ?>">
-						<input type="checkbox" role="button" aria-haspopup="true" id="toggle" class="hide-visually">
-						<label for="toggle" id="toggle-menu" class="button">
-							<?php _e( 'Menu', 'varia' ); ?>
-							<span class="dropdown-icon open">+</span>
-							<span class="dropdown-icon close">&times;</span>
-							<span class="hide-visually expanded-text"><?php _e( 'expanded', 'varia' ); ?></span>
-							<span class="hide-visually collapsed-text"><?php _e( 'collapsed', 'varia' ); ?></span>
-						</label>
-						<?php
-						wp_nav_menu(
-							array(
-								'theme_location' => 'menu-1',
-								'menu_class'     => 'main-menu',
-								'items_wrap'     => '<ul id="%1$s" class="%2$s" aria-label="submenu">%3$s</ul>',
-							)
-						);
-						?>
-					</nav><!-- #site-navigation -->
-				</div><!-- .site-menu -->
-				<?php endif; ?>
-				
-			</div>
-
-		</header><!-- #masthead -->
-
-	<div id="content" class="site-content">

+ 20 - 0
stratford/template-parts/footer/footer-content.php

@@ -0,0 +1,20 @@
+<?php if ( class_exists( 'A8C\FSE\WP_Template' ) ) : // If the FSE plugin is active, use the Header template for content. ?>
+	<footer class="fse-template-part fse-footer entry-content">
+	<?php
+		$template = new A8C\FSE\WP_Template();
+		$template->output_template_content( A8C\FSE\WP_Template::FOOTER );
+	else : // Otherwise we'll fallback to the default Varia footer below.
+		?>
+	<footer id="colophon" class="site-footer responsive-max-width">
+			<?php
+				if ( ! ( true === get_theme_mod( 'hide_site_footer', false ) && is_front_page() && is_page() ) ) : // If this is the homepage and the footer elements are set to hide, don't load this part.
+					get_template_part( 'template-parts/footer/footer', 'widgets' );
+					get_template_part( 'template-parts/header/social', 'navigation' ); 
+				endif;
+			?>
+	<?php endif; ?>
+		<div class="site-info">
+			<?php get_template_part( 'template-parts/footer/privacy', 'policy' ); ?>
+			<?php get_template_part( 'template-parts/footer/site', 'name' ); ?>
+		</div><!-- .site-info -->
+	</footer><!-- #colophon -->

+ 9 - 0
stratford/template-parts/footer/privacy-policy.php

@@ -0,0 +1,9 @@
+<?php
+if ( function_exists( 'the_privacy_policy_link' ) ) {
+	?>
+	<div class="privacy-policy-container">
+	<?php the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' ); ?>
+	</div>
+	<?php
+}
+?>

+ 6 - 0
stratford/template-parts/header/header-content.php

@@ -0,0 +1,6 @@
+<header id="masthead" class="site-header alignfull">
+	<div class="site-header-wrapper">
+		<?php get_template_part( 'template-parts/header/site', 'branding' ); ?>
+		<?php get_template_part( 'template-parts/header/site', 'navigation' ); ?>
+	</div>
+</header><!-- #masthead -->

+ 1 - 40
varia/footer.php

@@ -15,46 +15,7 @@
 
 	</div><!-- #content -->
 
-	<?php if ( class_exists( 'A8C\FSE\WP_Template' ) ) : // If the FSE plugin is active, use the Header template for content. ?>
-	<footer class="fse-template-part fse-footer entry-content">
-	<?php
-		$template = new A8C\FSE\WP_Template();
-		$template->output_template_content( A8C\FSE\WP_Template::FOOTER );
-	else : // Otherwise we'll fallback to the default Varia footer below. ?>
-	<footer id="colophon" class="site-footer responsive-max-width">
-	<?php
-		get_template_part( 'template-parts/footer/footer', 'widgets' );
-
-		if ( has_nav_menu( 'menu-2' ) ) : ?>
-			<nav class="footer-navigation" aria-label="<?php esc_attr_e( 'Footer Menu', 'varia' ); ?>">
-				<?php
-				wp_nav_menu(
-					array(
-						'theme_location' => 'menu-2',
-						'menu_class'     => 'footer-menu',
-						'depth'          => 1,
-					)
-				);
-				?>
-			</nav><!-- .footer-navigation -->
-		<?php endif;
-	endif; ?>
-
-		<div class="site-info">
-			<?php $blog_info = get_bloginfo( 'name' ); ?>
-			<?php if ( ! empty( $blog_info ) ) : ?>
-				<a class="site-name" href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a><span class="comma">,</span>
-			<?php endif; ?>
-			<?php /* translators: 1: WordPress link, 2: WordPress. */
-			printf( '<a href="%1$s" class="imprint">proudly powered by %2$s</a>.',
-				esc_url( __( 'https://wordpress.org/', 'varia' ) ),
-				'WordPress'
-			); ?>
-			<?php if ( function_exists( 'the_privacy_policy_link' ) ) {
-				the_privacy_policy_link();
-			} ?>
-		</div><!-- .site-info -->
-	</footer><!-- #colophon -->
+	<?php get_template_part( 'template-parts/footer/footer', 'content' ); ?>
 
 </div><!-- #page -->
 

+ 48 - 0
varia/functions.php

@@ -357,6 +357,54 @@ function varia_mobile_nav_on_side_setup() {
 	add_action( 'wp_enqueue_scripts', 'varia_add_mobile_nav_on_side_scripts' );
 }
 
+/**
+ * Add ability to show or hide header and footer elements on the homepage.
+ */
+function varia_customize_header_footer( $wp_customize ) {
+
+	// Add setting to hide the site header on the homepage.
+	$wp_customize->add_setting( 'hide_site_header', array(
+		'default'              => false,
+		'type'                 => 'theme_mod',
+		'transport'            => 'refresh',
+		'sanitize_callback'    => 'varia_sanitize_checkbox',
+	) );
+
+	// Add control to hide the site header on the homepage.
+	$wp_customize->add_control( 'hide_site_header', array(
+		'label'		  => esc_html__( 'Hide the Site Header', 'seedlet' ),
+		'description' => esc_html__( 'Check to hide the site header, if your homepage is set to display a static page.', 'seedlet' ),
+		'section'	  => 'static_front_page',
+		'priority'	  => 10,
+		'type'		  => 'checkbox',
+		'settings'	  => 'hide_site_header',
+	) );
+
+	// Add setting to hide footer elements on the homepage.
+	$wp_customize->add_setting( 'hide_site_footer', array(
+		'default'              => false,
+		'type'                 => 'theme_mod',
+		'transport'            => 'refresh',
+		'sanitize_callback'    => 'varia_sanitize_checkbox',
+	) );
+
+	// Add control to hide footer elements on the homepage.
+	$wp_customize->add_control( 'hide_site_footer', array(
+		'label'		  => esc_html__( 'Hide the Site Footer Menu & Widgets', 'seedlet' ),
+		'description' => esc_html__( 'Check to hide the site menu & widgets in the footer, if your homepage is set to display a static page.', 'seedlet' ),
+		'section'	  => 'static_front_page',
+		'priority'	  => 10,
+		'type'		  => 'checkbox',
+		'settings'	  => 'hide_site_footer',
+	) );
+
+	// Sanitize checkboxes.
+	function varia_sanitize_checkbox( $checked = null ) {
+		return (bool) isset( $checked ) && true === $checked;
+	}
+}
+add_action( 'customize_register', 'varia_customize_header_footer' );
+
 /**
  * SVG Icons class.
  */

+ 9 - 70
varia/header.php

@@ -10,18 +10,6 @@
  * @subpackage Varia
  * @since 1.0.0
  */
-$has_primary_nav       = has_nav_menu( 'menu-1' );
-$has_primary_nav_items = wp_nav_menu(
-	array(
-		'theme_location' => 'menu-1',
-		'fallback_cb'    => false,
-		'echo'           => false,
-	)
-);
-$header_classes        = 'site-header responsive-max-width';
-$header_classes       .= has_custom_logo() ? ' has-logo' : '';
-$header_classes       .= 1 === get_theme_mod( 'header_text', 1 ) ? ' has-title-and-tagline' : '';
-$header_classes       .= $has_primary_nav ? ' has-menu' : '';
 ?><!doctype html>
 <html <?php language_attributes(); ?>>
 <head>
@@ -42,63 +30,14 @@ if ( function_exists( 'wp_body_open' ) ) {
 <div id="page" class="site">
 	<a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'varia' ); ?></a>
 
-	<?php if ( class_exists( 'A8C\FSE\WP_Template' ) ) : // If the FSE plugin is active, use the Header template for content. ?>
-
-		<header id="masthead" class="fse-template-part fse-header entry-content">
-			<?php
-				$template = new A8C\FSE\WP_Template();
-				$template->output_template_content( A8C\FSE\WP_Template::HEADER );
-			?>
-		</header>
-
-	<?php else : // Otherwise we'll fallback to the default Varia header below. ?>
-		<header id="masthead" class="<?php echo $header_classes; ?>" role="banner">
-			<?php get_template_part( 'template-parts/header/site', 'branding' ); ?>
-
-			<?php if ( $has_primary_nav && $has_primary_nav_items ) : ?>
-				<nav id="site-navigation" class="main-navigation" aria-label="<?php esc_attr_e( 'Main Navigation', 'varia' ); ?>">
-
-					<input type="checkbox" role="button" aria-haspopup="true" id="toggle" class="hide-visually">
-					<label for="toggle" id="toggle-menu" class="button">
-						<?php _e( 'Menu', 'varia' ); ?>
-						<span class="dropdown-icon open">+</span>
-						<span class="dropdown-icon close">&times;</span>
-						<span class="hide-visually expanded-text"><?php _e( 'expanded', 'varia' ); ?></span>
-						<span class="hide-visually collapsed-text"><?php _e( 'collapsed', 'varia' ); ?></span>
-					</label>
-
-					<?php
-					$main_nav_args = array(
-						'theme_location' => 'menu-1',
-						'menu_class'     => 'main-menu',
-						'items_wrap'     => '<ul id="%1$s" class="%2$s" aria-label="submenu">%3$s</ul>',
-					);
-					if ( get_theme_mod( 'enable_side_menu' ) === 1 ) {
-						$main_nav_args['container_class'] = 'main-menu-container';
-					}
-					wp_nav_menu( $main_nav_args );
-					?>
-				</nav><!-- #site-navigation -->
-			<?php endif; ?>
-
-			<?php if ( has_nav_menu( 'social' ) ) : ?>
-				<nav class="social-navigation" role="navigation" aria-label="<?php esc_attr_e( 'Social Links Menu', 'varia' ); ?>">
-					<?php
-					wp_nav_menu(
-						array(
-							'theme_location' => 'social',
-							'menu_class'     => 'social-links-menu',
-							'link_before'    => '<span class="screen-reader-text">',
-							'link_after'     => '</span>' . varia_get_icon_svg( 'link' ),
-							'depth'          => 1,
-						)
-					);
-					?>
-				</nav><!-- .social-navigation -->
-			<?php endif; ?>
-
-		</header><!-- #masthead -->
-
-	<?php endif; ?>
+	<?php
+	if ( ( true === get_theme_mod( 'hide_site_header', false ) && is_front_page() && is_page() ) ) {
+		// Do nothing if this is the homepage and the hide-header setting is active.
+	} elseif ( class_exists( 'A8C\FSE\WP_Template' ) ) { // If not, check if the FSE plugin is active, use the Header template for content.
+		get_template_part( 'template-parts/header/fse', 'header' );
+	} else { // Otherwise we'll fallback to the default Varia header below.
+		get_template_part( 'template-parts/header/header', 'content' );
+	}
+	?>
 
 	<div id="content" class="site-content">

+ 0 - 4
varia/inc/style-wpcom.css

@@ -9,10 +9,6 @@
 	display: none;
 }
 
-.home.page.hide-homepage-title .site-main > article > .entry-content {
-	margin-top: 0;
-}
-
 /**
  * Fix Direct Manipulation icons in the Customizer
  */

+ 14 - 0
varia/inc/template-functions.php

@@ -40,6 +40,20 @@ function varia_body_classes( $classes ) {
 		$classes[] = 'image-filters-enabled';
 	}
 
+	// Add a body class if the site header is hidden on the homepage.
+	$hide_site_header = get_theme_mod( 'hide_site_header', false );
+
+	if ( true === $hide_site_header && is_front_page() && is_page() ) {
+		$classes[] = 'hide-homepage-header';
+	}
+
+	// Add a body class if the footer elements are hidden on the homepage.
+	$hide_site_footer = get_theme_mod( 'hide_site_footer', false );
+
+	if ( true === $hide_site_footer && is_front_page() && is_page() ) {
+		$classes[] = 'hide-homepage-footer';
+	}
+
 	return $classes;
 }
 add_filter( 'body_class', 'varia_body_classes' );

+ 12 - 0
varia/inc/wpcom.php

@@ -115,6 +115,18 @@ function varia_wpcom_body_classes( $classes ) {
 		$classes[] = 'hide-homepage-title';
 	}
 
+	$hide_site_header = get_theme_mod( 'hide_site_header', false );
+
+	if ( true === $hide_site_header ) {
+		$classes[] = 'hide-homepage-header';
+	}
+
+	$hide_site_footer = get_theme_mod( 'hide_site_footer', false );
+
+	if ( true === $hide_site_footer ) {
+		$classes[] = 'hide-homepage-footer';
+	}
+
 	$credit_option = get_option( 'footercredit' );
 
 	if ( 'hidden' == $credit_option ) {

+ 1 - 1
varia/package-lock.json

@@ -1,6 +1,6 @@
 {
   "name": "varia",
-  "version": "1.5.10",
+  "version": "1.5.11",
   "lockfileVersion": 1,
   "requires": true,
   "dependencies": {

+ 14 - 0
varia/sass/components/content/_entry-content.scss

@@ -56,6 +56,20 @@
 	.wp-audio-shortcode {
 		@extend %responsive-aligndefault;
 	}
+
+	// If the homepage header and page title are both configured to be hidden.
+	.home.page.hide-homepage-header.hide-homepage-title & {
+		margin-top: 0;
+		padding-top: 0;
+
+		// Move some full-width blocks up to the top of the screen.
+		> .wp-block-image.alignfull:first-child,
+		> .wp-block-cover.alignfull:first-child,
+		> .wp-block-media-text.alignfull:first-child,
+		> .wp-block-group.has-background.alignfull:first-child {
+			margin-top: #{-1 * map-deep-get($config-global, "spacing", "vertical")};
+		}
+	}
 }
 
 .entry-attachment {

+ 12 - 0
varia/style-rtl.css

@@ -3203,6 +3203,18 @@ body:not(.fse-enabled) .footer-menu a {
 	overflow: scroll;
 }
 
+.home.page.hide-homepage-header.hide-homepage-title .entry-content {
+	margin-top: 0;
+	padding-top: 0;
+}
+
+.home.page.hide-homepage-header.hide-homepage-title .entry-content > .wp-block-image.alignfull:first-child,
+.home.page.hide-homepage-header.hide-homepage-title .entry-content > .wp-block-cover.alignfull:first-child,
+.home.page.hide-homepage-header.hide-homepage-title .entry-content > .wp-block-media-text.alignfull:first-child,
+.home.page.hide-homepage-header.hide-homepage-title .entry-content > .wp-block-group.has-background.alignfull:first-child {
+	margin-top: -32px;
+}
+
 .entry-attachment {
 	text-align: center;
 }

+ 12 - 0
varia/style.css

@@ -3222,6 +3222,18 @@ body:not(.fse-enabled) .footer-menu a {
 	overflow: scroll;
 }
 
+.home.page.hide-homepage-header.hide-homepage-title .entry-content {
+	margin-top: 0;
+	padding-top: 0;
+}
+
+.home.page.hide-homepage-header.hide-homepage-title .entry-content > .wp-block-image.alignfull:first-child,
+.home.page.hide-homepage-header.hide-homepage-title .entry-content > .wp-block-cover.alignfull:first-child,
+.home.page.hide-homepage-header.hide-homepage-title .entry-content > .wp-block-media-text.alignfull:first-child,
+.home.page.hide-homepage-header.hide-homepage-title .entry-content > .wp-block-group.has-background.alignfull:first-child {
+	margin-top: -32px;
+}
+
 .entry-attachment {
 	text-align: center;
 }

+ 20 - 0
varia/template-parts/footer/footer-content.php

@@ -0,0 +1,20 @@
+<?php if ( class_exists( 'A8C\FSE\WP_Template' ) ) : // If the FSE plugin is active, use the Header template for content. ?>
+	<footer class="fse-template-part fse-footer entry-content">
+	<?php
+		$template = new A8C\FSE\WP_Template();
+		$template->output_template_content( A8C\FSE\WP_Template::FOOTER );
+	else : // Otherwise we'll fallback to the default Varia footer below.
+		?>
+
+	<footer id="colophon" class="site-footer responsive-max-width">
+			<?php
+			if ( ! ( true === get_theme_mod( 'hide_site_footer', false ) && is_front_page() && is_page() ) ) : // If this is the homepage and the footer elements are set to hide, don't load this part.
+				get_template_part( 'template-parts/footer/footer', 'widgets' );
+				get_template_part( 'template-parts/footer/footer', 'navigation' );
+			endif;
+			?>
+
+	<?php endif; ?>
+
+		<?php get_template_part( 'template-parts/footer/footer', 'info' ); ?>
+	</footer><!-- #colophon -->

+ 4 - 0
varia/template-parts/footer/footer-info.php

@@ -0,0 +1,4 @@
+<div class="site-info">
+	<?php get_template_part( 'template-parts/footer/site', 'name' ); ?>
+	<?php get_template_part( 'template-parts/footer/privacy', 'policy' ); ?>
+</div><!-- .site-info -->

+ 13 - 0
varia/template-parts/footer/footer-navigation.php

@@ -0,0 +1,13 @@
+<?php if ( has_nav_menu( 'menu-2' ) ) : ?>
+	<nav class="footer-navigation" aria-label="<?php esc_attr_e( 'Footer Menu', 'varia' ); ?>">
+		<?php
+		wp_nav_menu(
+			array(
+				'theme_location' => 'menu-2',
+				'menu_class'     => 'footer-menu',
+				'depth'          => 1,
+			)
+		);
+		?>
+	</nav><!-- .footer-navigation -->
+<?php endif; ?>

+ 3 - 0
varia/template-parts/footer/privacy-policy.php

@@ -0,0 +1,3 @@
+<?php if ( function_exists( 'the_privacy_policy_link' ) ) {
+	the_privacy_policy_link();
+}

+ 12 - 0
varia/template-parts/footer/site-name.php

@@ -0,0 +1,12 @@
+<?php $blog_info = get_bloginfo( 'name' ); ?>
+<?php if ( ! empty( $blog_info ) ) : ?>
+	<a class="site-name" href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a><span class="comma">,</span>
+<?php endif; ?>
+<?php
+	/* translators: 1: WordPress link, 2: WordPress. */
+	printf(
+		'<a href="%1$s" class="imprint">proudly powered by %2$s</a>.',
+		esc_url( __( 'https://wordpress.org/', 'varia' ) ),
+		'WordPress'
+	);
+	?>

+ 6 - 0
varia/template-parts/header/fse-header.php

@@ -0,0 +1,6 @@
+<header id="masthead" class="fse-template-part fse-header entry-content">
+	<?php
+		$template = new A8C\FSE\WP_Template();
+		$template->output_template_content( A8C\FSE\WP_Template::HEADER );
+	?>
+</header>

+ 13 - 0
varia/template-parts/header/header-content.php

@@ -0,0 +1,13 @@
+<?php
+$has_primary_nav = has_nav_menu( 'menu-1' );
+$header_classes  = 'site-header responsive-max-width';
+$header_classes .= has_custom_logo() ? ' has-logo' : '';
+$header_classes .= 1 === get_theme_mod( 'header_text', 1 ) ? ' has-title-and-tagline' : '';
+$header_classes .= $has_primary_nav ? ' has-menu' : '';
+?>
+
+<header id="masthead" class="<?php echo $header_classes; ?>" role="banner">
+	<?php get_template_part( 'template-parts/header/site', 'branding' ); ?>
+	<?php get_template_part( 'template-parts/header/site', 'navigation' ); ?>
+	<?php get_template_part( 'template-parts/header/social', 'navigation' ); ?>
+</header><!-- #masthead -->

+ 36 - 0
varia/template-parts/header/site-navigation.php

@@ -0,0 +1,36 @@
+<?php 
+	$has_primary_nav       = has_nav_menu( 'menu-1' );
+	$has_primary_nav_items = wp_nav_menu(
+		array(
+			'theme_location' => 'menu-1',
+			'fallback_cb'    => false,
+			'echo'           => false,
+		)
+	);
+
+	if ( $has_primary_nav && $has_primary_nav_items ) : 
+?>
+	<nav id="site-navigation" class="main-navigation" aria-label="<?php esc_attr_e( 'Main Navigation', 'varia' ); ?>">
+
+		<input type="checkbox" role="button" aria-haspopup="true" id="toggle" class="hide-visually">
+		<label for="toggle" id="toggle-menu" class="button">
+			<?php _e( 'Menu', 'varia' ); ?>
+			<span class="dropdown-icon open">+</span>
+			<span class="dropdown-icon close">&times;</span>
+			<span class="hide-visually expanded-text"><?php _e( 'expanded', 'varia' ); ?></span>
+			<span class="hide-visually collapsed-text"><?php _e( 'collapsed', 'varia' ); ?></span>
+		</label>
+
+		<?php
+		$main_nav_args = array(
+			'theme_location' => 'menu-1',
+			'menu_class'     => 'main-menu',
+			'items_wrap'     => '<ul id="%1$s" class="%2$s" aria-label="submenu">%3$s</ul>',
+		);
+		if ( get_theme_mod( 'enable_side_menu' ) === 1 ) {
+			$main_nav_args['container_class'] = 'main-menu-container';
+		}
+		wp_nav_menu( $main_nav_args );
+		?>
+	</nav><!-- #site-navigation -->
+<?php endif; ?>

+ 15 - 0
varia/template-parts/header/social-navigation.php

@@ -0,0 +1,15 @@
+<?php if ( has_nav_menu( 'social' ) ) : ?>
+	<nav class="social-navigation" role="navigation" aria-label="<?php esc_attr_e( 'Social Links Menu', 'varia' ); ?>">
+		<?php
+		wp_nav_menu(
+			array(
+				'theme_location' => 'social',
+				'menu_class'     => 'social-links-menu',
+				'link_before'    => '<span class="screen-reader-text">',
+				'link_after'     => '</span>' . varia_get_icon_svg( 'link' ),
+				'depth'          => 1,
+			)
+		);
+		?>
+	</nav><!-- .social-navigation -->
+<?php endif; ?>