header.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /**
  3. * The template for displaying the header
  4. *
  5. * Displays all of the head element and everything up until the "site-content" div.
  6. *
  7. * @package WordPress
  8. * @subpackage Twenty_Fifteen
  9. * @since Twenty Fifteen 1.0
  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">
  16. <link rel="profile" href="http://gmpg.org/xfn/11">
  17. <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
  18. <!--[if lt IE 9]>
  19. <script src="<?php echo esc_url( get_template_directory_uri() ); ?>/js/html5.js"></script>
  20. <![endif]-->
  21. <?php wp_head(); ?>
  22. </head>
  23. <body <?php body_class(); ?>>
  24. <div id="page" class="hfeed site">
  25. <a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'twentyfifteen' ); ?></a>
  26. <div id="sidebar" class="sidebar">
  27. <header id="masthead" class="site-header" role="banner">
  28. <div class="site-branding">
  29. <?php
  30. if ( is_front_page() && is_home() ) : ?>
  31. <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
  32. <?php else : ?>
  33. <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
  34. <?php endif;
  35. $description = get_bloginfo( 'description', 'display' );
  36. if ( $description || is_customize_preview() ) : ?>
  37. <p class="site-description"><?php echo $description; ?></p>
  38. <?php endif;
  39. ?>
  40. <button class="secondary-toggle"><?php _e( 'Menu and widgets', 'twentyfifteen' ); ?></button>
  41. </div><!-- .site-branding -->
  42. </header><!-- .site-header -->
  43. <?php get_sidebar(); ?>
  44. </div><!-- .sidebar -->
  45. <div id="content" class="site-content">