header.php 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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 UIU_CSE
  10. */
  11. ?>
  12. <!doctype html>
  13. <html <?php language_attributes(); ?>>
  14. <head>
  15. <meta charset="<?php bloginfo( 'charset' ); ?>">
  16. <meta name="viewport" content="width=device-width, initial-scale=1">
  17. <link rel="profile" href="https://gmpg.org/xfn/11">
  18. <?php wp_head(); ?>
  19. </head>
  20. <body <?php body_class(); ?>>
  21. <?php wp_body_open(); ?>
  22. <div id="page" class="site">
  23. <a class="skip-link screen-reader-text" href="#primary"><?php esc_html_e( 'Skip to content', 'uiu-cse' ); ?></a>
  24. <header id="masthead" class="site-header">
  25. <div class="site-branding">
  26. <?php
  27. the_custom_logo();
  28. if ( is_front_page() && is_home() ) :
  29. ?>
  30. <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
  31. <?php
  32. else :
  33. ?>
  34. <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
  35. <?php
  36. endif;
  37. $uiu_cse_description = get_bloginfo( 'description', 'display' );
  38. if ( $uiu_cse_description || is_customize_preview() ) :
  39. ?>
  40. <p class="site-description"><?php echo $uiu_cse_description; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p>
  41. <?php endif; ?>
  42. </div><!-- .site-branding -->
  43. <nav id="site-navigation" class="main-navigation">
  44. <button class="menu-toggle" aria-controls="primary-menu" aria-expanded="false"><?php esc_html_e( 'Primary Menu', 'uiu-cse' ); ?></button>
  45. <?php
  46. wp_nav_menu(
  47. array(
  48. 'theme_location' => 'menu-1',
  49. 'menu_id' => 'primary-menu',
  50. )
  51. );
  52. ?>
  53. </nav><!-- #site-navigation -->
  54. </header><!-- #masthead -->