ajthemacboy

Header

Nov 20th, 2015
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.63 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * The Header template for our theme
  5. *
  6. **/
  7. ?><!DOCTYPE html>
  8. <html <?php language_attributes(); ?>>
  9. <head>
  10. <meta charset="<?php bloginfo( 'charset' ); ?>">
  11. <meta name="viewport" content="width=device-width, initial-scale=1">
  12. <link rel="profile" href="http://gmpg.org/xfn/11">
  13. <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
  14. <!--[if lt IE 9]>
  15. <script src="<?php echo get_template_directory_uri(); ?>/js/html5.js"></script>
  16. <![endif]-->
  17. <?php wp_head(); ?>
  18. </head>
  19. <body <?php body_class(); ?>>
  20. <!--[if lte IE 8]>
  21. <div id="ie-toolbar"><div><?php _e('You\'re using an unsupported version of Internet Explorer. Please <a href="http://windows.microsoft.com/en-us/internet-explorer/products/ie/home">upgrade your browser</a> for the best user experience on our site. Thank you.', 'portfolio') ?></div></div>
  22. <![endif]-->
  23. <header id="masthead" class="site-header" role="banner">
  24. <a class="home-link" href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
  25. <?php if(get_theme_mod('portfolio_logo', '') !== '') : ?>
  26. <img src="<?php echo get_theme_mod('portfolio_logo', ''); ?>" alt="<?php bloginfo( 'name' ); ?>" />
  27. <?php else: ?>
  28. <h1 class="site-title"><?php bloginfo( 'name' ); ?></h1>
  29. <?php if(trim(get_bloginfo('description')) != '' || is_customize_preview()) : ?>
  30. <h2 class="site-description"><?php bloginfo('description'); ?></h2>
  31. <?php endif; ?>
  32. <?php endif; ?>
  33. </a>
  34.  
  35. <?php if(get_theme_mod('portfolio_show_topbar_search', '') != '') : ?>
  36. <form role="search" method="get" class="search-topbar" action="<?php echo home_url( '/' ); ?>">
  37. <label>
  38. <span class="screen-reader-text"><?php echo _x( 'Search for:', 'label', 'portfolio' ); ?></span>
  39. <input type="search" class="search-topbar-field" placeholder="<?php echo esc_attr_x( 'Search …', 'placeholder', 'portfolio' ); ?>" value="<?php echo get_search_query() ?>" name="s" title="<?php echo esc_attr_x( 'Search for:', 'label', 'portfolio' ); ?>" />
  40. </label>
  41. </form>
  42. <?php endif; ?>
  43.  
  44. <?php if(get_theme_mod('portfolio_show_topbar_social', '') != '') : ?>
  45. <?php wp_nav_menu(array('theme_location' => 'footer', 'menu_class' => 'social-menu-topbar')); ?>
  46. <?php endif; ?>
  47. </header><!-- #masthead -->
  48.  
  49. <div id="main" class="site-main">
  50. <div id="page" class="hfeed site">
  51.  
  52. <nav id="site-navigation" class="main-navigation" role="navigation">
  53. <?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu' ) ); ?>
  54. </nav><!-- #site-navigation -->
Advertisement
Add Comment
Please, Sign In to add comment