header.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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 Dara
  10. */
  11. ?><!DOCTYPE html>
  12. <html <?php language_attributes(); ?>>
  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. <?php wp_head(); ?>
  18. </head>
  19. <body <?php body_class(); ?>>
  20. <div id="page" class="site">
  21. <a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'dara' ); ?></a>
  22. <header id="masthead" class="site-header" role="banner">
  23. <?php get_template_part( 'components/header/custom', 'header' ); ?>
  24. <?php get_template_part( 'components/header/site', 'branding' ); ?>
  25. <?php get_template_part( 'components/navigation/navigation', 'top' ); ?>
  26. </header>
  27. <?php if ( is_front_page() ) {
  28. if ( dara_has_featured_posts() ) :
  29. get_template_part( 'components/post/content', 'featured' );
  30. elseif ( 'page' === get_post_type() && has_post_thumbnail() ) :
  31. get_template_part( 'components/page/content', 'hero' );
  32. endif;
  33. } ?>
  34. <div id="content" class="site-content">