header.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /**
  3. * The header for our theme.
  4. *
  5. * This is the template that displays all of the <head> section and everything up until <div id="content">
  6. *
  7. * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
  8. *
  9. * @package TextBook
  10. */
  11. ?><!DOCTYPE html>
  12. <html <?php language_attributes(); ?> class="no-js">
  13. <head>
  14. <meta charset="<?php bloginfo( 'charset' ); ?>">
  15. <meta name="viewport" content="width=device-width, initial-scale=1">
  16. <link rel="profile" href="http://gmpg.org/xfn/11">
  17. <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
  18. <?php wp_head(); ?>
  19. </head>
  20. <body <?php body_class(); ?>>
  21. <div id="page" class="site">
  22. <a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'textbook' ); ?></a>
  23. <header id="masthead" class="site-header" role="banner">
  24. <?php get_template_part( 'components/header/site', 'branding' ); ?>
  25. <?php get_template_part( 'components/navigation/navigation', 'top' ); ?>
  26. </header><!-- .site-header -->
  27. <?php // Only show featured content or testimonials on home page
  28. if ( is_home() ) {
  29. // Add the Featured Content template
  30. get_template_part( 'components/features/featured-content/display', 'featured' );
  31. // Add the Testinomials template
  32. get_template_part( 'components/features/testimonials/display', 'testimonials' );
  33. } ?>
  34. <div id="content" class="site-content">