Advertisement
slkmclaren

header.php (harmony theme)

Dec 18th, 2012
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.26 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <!--[if IE 6]>
  3. <html id="ie6" <?php language_attributes(); ?>>
  4. <![endif]-->
  5. <!--[if IE 7]>
  6. <html id="ie7" <?php language_attributes(); ?>>
  7. <![endif]-->
  8. <!--[if IE 8]>
  9. <html id="ie8" <?php language_attributes(); ?>>
  10. <![endif]-->
  11. <!--[if !(IE 6) | !(IE 7) | !(IE 8) ]><!-->
  12. <html <?php language_attributes(); ?>>
  13. <!--<![endif]-->
  14. <head>
  15. <meta charset="<?php bloginfo( 'charset' ); ?>" />
  16. <title><?php elegant_titles(); ?></title>
  17. <?php elegant_description(); ?>
  18. <?php elegant_keywords(); ?>
  19. <?php elegant_canonical(); ?>
  20.  
  21. <?php do_action('et_head_meta'); ?>
  22.  
  23. <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
  24.  
  25. <?php $template_directory_uri = get_template_directory_uri(); ?>
  26. <!--[if lt IE 9]>
  27. <script src="<?php echo esc_url( $template_directory_uri . '/js/html5.js"' ); ?>" type="text/javascript"></script>
  28. <![endif]-->
  29.  
  30. <script type="text/javascript">
  31. document.documentElement.className = 'js';
  32. </script>
  33.  
  34. <?php wp_head(); ?>
  35. </head>
  36. <body <?php body_class(); ?>>
  37.  
  38. <?php do_action('et_header_top'); ?>
  39.  
  40. <header id="main-header" class="main_bg">
  41. <div class="container">
  42. <?php $logo = ( $user_logo = et_get_option( 'harmony_logo' ) ) && '' != $user_logo ? $user_logo : $template_directory_uri . '/images/logo.png'; ?>
  43. <a href="<?php echo esc_url( home_url() ); ?>"><img src="<?php echo esc_url( $logo ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name' ) ); ?>" id="logo"/></a>
  44.  
  45. <hgroup>
  46. <h1><?php bloginfo( 'name' ); ?></h1>
  47. <h2><?php bloginfo( 'description' ); ?></h2>
  48. </hgroup>
  49. </div> <!-- end .container -->
  50. </header> <!-- end #main-header -->
  51. <div id="main-nav">
  52. <div class="container clearfix">
  53. <nav id="top-menu">
  54. <?php
  55. $menuClass = 'nav';
  56. $primaryNav = '';
  57.  
  58. if ( 'on' == et_get_option( 'harmony_disable_toptier' ) ) $menuClass .= ' et_disable_top_tier';
  59.  
  60. $primaryNav = wp_nav_menu( array( 'theme_location' => 'primary-menu', 'container' => '', 'fallback_cb' => '', 'menu_class' => $menuClass, 'echo' => false ) );
  61.  
  62. if ( '' == $primaryNav ) { ?>
  63. <ul class="<?php echo esc_attr( $menuClass ); ?>">
  64. <?php if ( 'on' == et_get_option( 'harmony_home_link' ) ) { ?>
  65. <li <?php if ( is_home() ) echo( 'class="current_page_item"' ); ?>><a href="<?php echo esc_url( home_url() ); ?>"><?php esc_html_e( 'Home', 'Harmony' ); ?></a></li>
  66. <?php } ?>
  67.  
  68. <?php show_page_menu( $menuClass, false, false ); ?>
  69. <?php show_categories_menu( $menuClass, false ); ?>
  70. </ul>
  71. <?php }
  72. else echo $primaryNav;
  73. ?>
  74. </nav>
  75.  
  76. <div id="social-icons">
  77. <?php
  78. $et_rss_url = '' != et_get_option( 'harmony_rss_url' ) ? et_get_option( 'harmony_rss_url' ) : get_bloginfo( 'comments_rss2_url' );
  79. if ( 'on' == et_get_option( 'harmony_show_twitter_icon', 'on' ) ) $social_icons['twitter'] = array( 'image' => $template_directory_uri . '/images/twitter.png', 'url' => et_get_option( 'harmony_twitter_url' ), 'alt' => __( 'Twitter', 'Harmony' ) );
  80. if ( 'on' == et_get_option( 'harmony_show_rss_icon', 'on' ) ) $social_icons['rss'] = array( 'image' => $template_directory_uri . '/images/rss.png', 'url' => $et_rss_url, 'alt' => __( 'Rss', 'Harmony' ) );
  81. if ( 'on' == et_get_option( 'harmony_show_facebook_icon','on' ) ) $social_icons['facebook'] = array( 'image' => $template_directory_uri . '/images/facebook.png', 'url' => et_get_option( 'harmony_facebook_url' ), 'alt' => __( 'Facebook', 'Harmony' ) );
  82. if ( 'on' == et_get_option( 'harmony_show_soundcloud_icon', 'on' ) ) $social_icons['soundcloud'] = array( 'image' => $template_directory_uri . '/images/soundcloud.png', 'url' => et_get_option( 'harmony_soundcloud_url' ), 'alt' => __( 'SoundCloud', 'Harmony' ) );
  83.  
  84. if ( ! empty( $social_icons ) ) {
  85. $social_icons = apply_filters( 'et_social_icons', $social_icons );
  86. foreach ( $social_icons as $icon ) {
  87. if ( $icon['url'] )
  88. printf( '<a href="%s" target="_blank"><img src="%s" alt="%s" /></a>', esc_url( $icon['url'] ), esc_url( $icon['image'] ), esc_attr( $icon['alt'] ) );
  89. }
  90. }
  91. ?>
  92. </div> <!-- end .#social-icons -->
  93. </div> <!-- end .container -->
  94. </div> <!-- end #main-nav -->
  95.  
  96. <?php if ( ! is_home() ) get_template_part( 'includes/breadcrumbs' ); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement