1. <?php
  2. /**
  3. * The Header for our theme.
  4. *
  5. * Displays all of the <head> section and everything up till <div id="main">
  6. *
  7. * @package WordPress
  8. * @subpackage Twenty_Twelve
  9. * @since Twenty Twelve 1.0
  10. */
  11.  
  12. ?>
  13. <!DOCTYPE html>
  14. <!--[if IE 7 | IE 8]>
  15. <html class="ie" <?php language_attributes(); ?>>
  16. <![endif]-->
  17. <!--[if !(IE 7) | !(IE 8) ]><!-->
  18. <html <?php language_attributes(); ?>>
  19. <!--<![endif]-->
  20. <head>
  21.  
  22. <meta charset="<?php bloginfo( 'charset' ); ?>" />
  23. <meta name="viewport" content="width=device-width" />
  24. <title><?php wp_title( '|', true, 'right' ); ?></title>
  25. <link rel="profile" href="http://gmpg.org/xfn/11" />
  26. <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
  27.  
  28. <!-- Loads HTML5 JavaScript file to add support for HTML5 elements in older IE versions. -->
  29.  
  30. <!--[if lt IE 9]>
  31. <script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
  32. <![endif]-->
  33.  
  34. <?php
  35. $theme_options = get_option('tto_theme_options'); // load nivo js and css only when it's needed
  36. if ($theme_options['slider_switch'] =='1'){
  37. wp_register_script( 'nivo-script', get_stylesheet_directory_uri() . '/inc/js/jquery.nivo.slider.pack.js', array( 'jquery' ) );
  38. wp_enqueue_script('nivo-script');
  39. }
  40. ?>
  41. <?php
  42. $theme_options = get_option('tto_theme_options');
  43. if ($theme_options['slider_switch'] =='1') {
  44.  
  45. $theme_options = get_option('tto_theme_options');
  46. if ($theme_options['slider_theme_switch'] =='0'){
  47. wp_register_style('nivo_theme_style', get_stylesheet_directory_uri() . '/inc/slider-themes/default/default.css');
  48. wp_enqueue_style('nivo_theme_style');
  49. }
  50. if ($theme_options['slider_theme_switch'] =='1'){
  51. wp_register_style('nivo_theme_style', get_stylesheet_directory_uri() . '/inc/slider-themes/light/light.css');
  52. wp_enqueue_style('nivo_theme_style');
  53. }
  54. if ($theme_options['slider_theme_switch'] =='2'){
  55. wp_register_style('nivo_theme_style', get_stylesheet_directory_uri() . '/inc/slider-themes/dark/dark.css');
  56. wp_enqueue_style('nivo_theme_style');
  57. }
  58. }
  59. ?>
  60. <?php
  61. wp_head(); // Custom CSS
  62. $theme_options = get_option('tto_theme_options');
  63. if ($theme_options['custom_css']) {
  64. echo '<style type="text/css" id="custom_css">' . $theme_options['custom_css'] . '</style>';
  65. }
  66. ?>
  67.  
  68. </head>
  69.  
  70. <body <?php body_class(); ?>>
  71. <div id="page" class="hfeed site">
  72. <header id="branding" class="site-header" role="banner">
  73. <hgroup>
  74. <h1 class="site-title">
  75. <a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
  76. </h1>
  77. <h2 class="site-description">
  78. <?php bloginfo( 'description' ); ?>
  79. </h2>
  80. </hgroup>
  81.  
  82.  
  83. <div id="header_icons">
  84. <ul><li><a href="http://www.crozon.ca/contact" target="_blank" alt="Email"><img src="http://www.crozon.ca/wordpress/wp-content/themes/glossy-stylo/images/email.png" /></a></li>
  85. <li><a href="http://www.crozon.ca/feed" target="_blank" alt="RSS"><img src="http://www.crozon.ca/wordpress/wp-content/themes/glossy-stylo/images/rss.png" /></a></li>
  86. <li><a href="http://twitter.com/crozon" target="_blank" alt="Twitter"><img src="http://www.crozon.ca/wordpress/wp-content/themes/glossy-stylo/images/twitter.png" /></a></li>
  87. <li><a href="http://ca.linkedin.com/in/coreyrozon" target="_blank" alt="LinkedIn"><img src="http://www.crozon.ca/wordpress/wp-content/themes/glossy-stylo/images/linkedin.png" /></a></li>
  88. <li><a href="http://www.facebook.com/crozon1" target="_blank" alt="Facebook"><img src="http://www.crozon.ca/wordpress/wp-content/themes/glossy-stylo/images/facebook.png" /></li></a></ul>
  89. </div>
  90.  
  91.  
  92. <div id=datetoday class="todaysdate">
  93. <?php echo date('l jS, F, Y') ?>
  94. </div>
  95.  
  96.  
  97. <?php /* Add our Logo and Information Bar */ ?>
  98. <div id="info-container"><?php get_template_part( 'header', 'logo' ); ?></div>
  99.  
  100.  
  101.  
  102. <nav id="site-navigation" class="main-navigation" role="navigation">
  103. <h3 class="menu-toggle">
  104. <?php _e( 'Main Menu', 'twentytwelve' ); ?>
  105. </h3>
  106. <div class="skip-link assistive-text">
  107. <a href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentytwelve' ); ?>"><?php _e( 'Skip to content', 'twentytwelve' ); ?></a>
  108. </div>
  109. <?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu', 'menu_id' => 'top-menu') ); ?>
  110. </nav><!-- #site-navigation -->
  111.  
  112. <?php // Enables or Disables Header Image
  113. if ($theme_options['slider_switch'] =='0')
  114. {
  115. $header_image = get_header_image();
  116. if ( ! empty( $header_image ) ) : ?>
  117. <a href="<?php echo esc_url( home_url( '/' ) ); ?>"><img src="<?php echo esc_url( $header_image ); ?>" class="header-image" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" /></a>
  118. <?php endif;
  119. }
  120. ?>
  121.  
  122. <?php // Enables or Disables Slider
  123. if ($theme_options['slider_switch'] =='1'){
  124. ?>
  125. <div class="grid-slider">
  126. <!-- Change number 5 to amount of slides you want to show -->
  127. <?php if(function_exists('show_featured_posts')) echo show_featured_posts('5'); ?>
  128. </div> <!-- .grid-slider -->
  129. <?php
  130. }
  131. ?>
  132. <nav id="lower-navigation" class="main-navigation" role="navigation">
  133. <h3 class="menu-toggle"><?php _e( 'Lower Menu', 'twentytwelve' ); ?></h3>
  134. <div class="skip-link assistive-text"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentytwelve' ); ?>"><?php _e( 'Skip to content', 'twentytwelve' ); ?></a></div>
  135. <?php wp_nav_menu( array( 'theme_location' =>'secondary','menu_class' =>'nav-menu','menu_id' => 'lower-menu','fallback_cb' => false ) ); ?>
  136. </nav><!-- #lower-navigation -->
  137.  
  138. </header><!-- #masthead -->
  139.  
  140. <div id="main" class="wrapper">