header.php 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?php
  2. /**
  3. * The Header for our theme
  4. *
  5. * Displays all of the <head> section and everything up till <div id="main">
  6. *
  7. * @package WordPress
  8. * @subpackage Twenty_Fourteen
  9. * @since Twenty Fourteen 1.0
  10. */
  11. ?><!DOCTYPE html>
  12. <!--[if IE 7]>
  13. <html class="ie ie7" <?php language_attributes(); ?>>
  14. <![endif]-->
  15. <!--[if IE 8]>
  16. <html class="ie ie8" <?php language_attributes(); ?>>
  17. <![endif]-->
  18. <!--[if !(IE 7) | !(IE 8) ]><!-->
  19. <html <?php language_attributes(); ?>>
  20. <!--<![endif]-->
  21. <head>
  22. <meta charset="<?php bloginfo( 'charset' ); ?>">
  23. <meta name="viewport" content="width=device-width">
  24. <title><?php wp_title( '|', true, 'right' ); ?></title>
  25. <link rel="profile" href="http://gmpg.org/xfn/11">
  26. <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
  27. <!--[if lt IE 9]>
  28. <script src="<?php echo get_template_directory_uri(); ?>/js/html5.js"></script>
  29. <![endif]-->
  30. <?php wp_head(); ?>
  31. </head>
  32. <body <?php body_class(); ?>>
  33. <div id="page" class="hfeed site">
  34. <?php if ( get_header_image() ) : ?>
  35. <div id="site-header">
  36. <a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
  37. <img src="<?php header_image(); ?>" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="">
  38. </a>
  39. </div>
  40. <?php endif; ?>
  41. <header id="masthead" class="site-header" role="banner">
  42. <div class="header-main">
  43. <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
  44. <div class="search-toggle">
  45. <a href="#search-container" class="screen-reader-text"><?php _e( 'Search', 'twentyfourteen' ); ?></a>
  46. </div>
  47. <nav id="primary-navigation" class="site-navigation primary-navigation" role="navigation">
  48. <h1 class="menu-toggle"><?php _e( 'Primary Menu', 'twentyfourteen' ); ?></h1>
  49. <a class="screen-reader-text skip-link" href="#content"><?php _e( 'Skip to content', 'twentyfourteen' ); ?></a>
  50. <?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu' ) ); ?>
  51. </nav>
  52. </div>
  53. <div id="search-container" class="search-box-wrapper hide">
  54. <div class="search-box">
  55. <?php get_search_form(); ?>
  56. </div>
  57. </div>
  58. </header><!-- #masthead -->
  59. <div id="main" class="site-main">