Quellcode durchsuchen

refactor footer templates to make it easier to share code

Ben Dwyer vor 4 Jahren
Ursprung
Commit
4662cf643e

+ 4 - 28
alves/footer.php → alves/template-parts/footer/footer-content.php

@@ -1,30 +1,13 @@
-<?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. ?>
+<?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 
+		<?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', 'widgets' );
 		endif; ?>
 
 		<div id="footer-info-wrapper">
@@ -34,17 +17,10 @@
 			if ( function_exists( 'the_privacy_policy_link' ) ) {
 				the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' );
 			}
-			get_template_part( 'template-parts/footer/footer', 'navigation' ); 
+			get_template_part( 'template-parts/footer/footer', 'navigation' );
 		endif;
 		get_template_part( 'template-parts/footer/footer', 'info' ); ?>
 		</div>
 	<?php endif; ?>
 
 	</footer><!-- #colophon -->
-
-</div><!-- #page -->
-
-<?php wp_footer(); ?>
-
-</body>
-</html>

+ 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>

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

@@ -0,0 +1,67 @@
+<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 -->

+ 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>

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

@@ -0,0 +1,33 @@
+<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 -->

+ 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>

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

@@ -0,0 +1,44 @@
+<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 -->

+ 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>

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

@@ -0,0 +1,44 @@
+<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 -->

+ 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>

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

@@ -0,0 +1,50 @@
+<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 -->

+ 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>

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

@@ -0,0 +1,39 @@
+<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 -->

+ 1 - 18
varia/footer.php

@@ -15,24 +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
-			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 -->
+	<?php get_template_part( 'template-parts/footer/footer', 'content' ); ?>
 
 </div><!-- #page -->
 

+ 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 -->