footer.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <?php
  2. /**
  3. * The template for displaying the footer
  4. *
  5. * Contains the closing of the #content div and all content after.
  6. *
  7. * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
  8. *
  9. * @package WordPress
  10. * @subpackage Twenty_Twenty_One
  11. * @since Twenty Twenty-One 1.0
  12. */
  13. ?>
  14. </main><!-- #main -->
  15. </div><!-- #primary -->
  16. </div><!-- #content -->
  17. <?php get_template_part( 'template-parts/footer/footer-widgets' ); ?>
  18. <footer id="colophon" class="site-footer">
  19. <?php if ( has_nav_menu( 'footer' ) ) : ?>
  20. <nav aria-label="<?php esc_attr_e( 'Secondary menu', 'twentytwentyone' ); ?>" class="footer-navigation">
  21. <ul class="footer-navigation-wrapper">
  22. <?php
  23. wp_nav_menu(
  24. array(
  25. 'theme_location' => 'footer',
  26. 'items_wrap' => '%3$s',
  27. 'container' => false,
  28. 'depth' => 1,
  29. 'link_before' => '<span>',
  30. 'link_after' => '</span>',
  31. 'fallback_cb' => false,
  32. )
  33. );
  34. ?>
  35. </ul><!-- .footer-navigation-wrapper -->
  36. </nav><!-- .footer-navigation -->
  37. <?php endif; ?>
  38. <div class="site-info">
  39. <div class="site-name">
  40. <?php if ( has_custom_logo() ) : ?>
  41. <div class="site-logo"><?php the_custom_logo(); ?></div>
  42. <?php else : ?>
  43. <?php if ( get_bloginfo( 'name' ) && get_theme_mod( 'display_title_and_tagline', true ) ) : ?>
  44. <?php if ( is_front_page() && ! is_paged() ) : ?>
  45. <?php bloginfo( 'name' ); ?>
  46. <?php else : ?>
  47. <a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a>
  48. <?php endif; ?>
  49. <?php endif; ?>
  50. <?php endif; ?>
  51. </div><!-- .site-name -->
  52. <?php
  53. if ( function_exists( 'the_privacy_policy_link' ) ) {
  54. the_privacy_policy_link( '<div class="privacy-policy">', '</div>' );
  55. }
  56. ?>
  57. <div class="powered-by">
  58. <?php
  59. printf(
  60. /* translators: %s: WordPress. */
  61. esc_html__( 'Proudly powered by %s.', 'twentytwentyone' ),
  62. '<a href="' . esc_url( __( 'https://wordpress.org/', 'twentytwentyone' ) ) . '">WordPress</a>'
  63. );
  64. ?>
  65. </div><!-- .powered-by -->
  66. </div><!-- .site-info -->
  67. </footer><!-- #colophon -->
  68. </div><!-- #page -->
  69. <?php wp_footer(); ?>
  70. </body>
  71. </html>