Browse Source

footer for Brompton

Maggie Cabrera 4 years ago
parent
commit
a15f25be54
1 changed files with 20 additions and 18 deletions
  1. 20 18
      brompton/template-parts/footer/footer-content.php

+ 20 - 18
brompton/template-parts/footer/footer-content.php

@@ -1,20 +1,22 @@
-<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,
-				)
-			);
+<?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.
 			?>
 			?>
-		</nav><!-- .footer-navigation -->
+			
+	<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 endif; ?>
-	<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 -->
-</footer><!-- #colophon -->
+
+		<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 -->
+	</footer><!-- #colophon -->