Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * The Header for our theme.
- *
- * Displays all of the <head> section and everything up till <div id="main">
- *
- * @package WordPress
- * @subpackage Twenty_Twelve
- * @since Twenty Twelve 1.0
- */
- ?>
- <!DOCTYPE html>
- <!--[if IE 7 | IE 8]>
- <html class="ie" <?php language_attributes(); ?>>
- <![endif]-->
- <!--[if !(IE 7) | !(IE 8) ]><!-->
- <html <?php language_attributes(); ?>>
- <!--<![endif]-->
- <head>
- <meta charset="<?php bloginfo( 'charset' ); ?>" />
- <meta name="viewport" content="width=device-width" />
- <title><?php wp_title( '|', true, 'right' ); ?></title>
- <link rel="profile" href="http://gmpg.org/xfn/11" />
- <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
- <!-- Loads HTML5 JavaScript file to add support for HTML5 elements in older IE versions. -->
- <!--[if lt IE 9]>
- <script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
- <![endif]-->
- <?php
- $theme_options = get_option('tto_theme_options'); // load nivo js and css only when it's needed
- if ($theme_options['slider_switch'] =='1'){
- wp_register_script( 'nivo-script', get_stylesheet_directory_uri() . '/inc/js/jquery.nivo.slider.pack.js', array( 'jquery' ) );
- wp_enqueue_script('nivo-script');
- }
- ?>
- <?php
- $theme_options = get_option('tto_theme_options');
- if ($theme_options['slider_switch'] =='1') {
- $theme_options = get_option('tto_theme_options');
- if ($theme_options['slider_theme_switch'] =='0'){
- wp_register_style('nivo_theme_style', get_stylesheet_directory_uri() . '/inc/slider-themes/default/default.css');
- wp_enqueue_style('nivo_theme_style');
- }
- if ($theme_options['slider_theme_switch'] =='1'){
- wp_register_style('nivo_theme_style', get_stylesheet_directory_uri() . '/inc/slider-themes/light/light.css');
- wp_enqueue_style('nivo_theme_style');
- }
- if ($theme_options['slider_theme_switch'] =='2'){
- wp_register_style('nivo_theme_style', get_stylesheet_directory_uri() . '/inc/slider-themes/dark/dark.css');
- wp_enqueue_style('nivo_theme_style');
- }
- }
- ?>
- <?php
- wp_head(); // Custom CSS
- $theme_options = get_option('tto_theme_options');
- if ($theme_options['custom_css']) {
- echo '<style type="text/css" id="custom_css">' . $theme_options['custom_css'] . '</style>';
- }
- ?>
- </head>
- <body <?php body_class(); ?>>
- <div id="page" class="hfeed site">
- <header id="branding" class="site-header" role="banner">
- <hgroup>
- <h1 class="site-title">
- <a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
- </h1>
- <h2 class="site-description">
- <?php bloginfo( 'description' ); ?>
- </h2>
- </hgroup>
- <div id="header_icons">
- <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>
- <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>
- <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>
- <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>
- <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>
- </div>
- <div id=datetoday class="todaysdate">
- <?php echo date('l jS, F, Y') ?>
- </div>
- <?php /* Add our Logo and Information Bar */ ?>
- <div id="info-container"><?php get_template_part( 'header', 'logo' ); ?></div>
- <nav id="site-navigation" class="main-navigation" role="navigation">
- <h3 class="menu-toggle">
- <?php _e( 'Main Menu', 'twentytwelve' ); ?>
- </h3>
- <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>
- <?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu', 'menu_id' => 'top-menu') ); ?>
- </nav><!-- #site-navigation -->
- <?php // Enables or Disables Header Image
- if ($theme_options['slider_switch'] =='0')
- {
- $header_image = get_header_image();
- if ( ! empty( $header_image ) ) : ?>
- <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>
- <?php endif;
- }
- ?>
- <?php // Enables or Disables Slider
- if ($theme_options['slider_switch'] =='1'){
- ?>
- <div class="grid-slider">
- <!-- Change number 5 to amount of slides you want to show -->
- <?php if(function_exists('show_featured_posts')) echo show_featured_posts('5'); ?>
- </div> <!-- .grid-slider -->
- <?php
- }
- ?>
- <nav id="lower-navigation" class="main-navigation" role="navigation">
- <h3 class="menu-toggle"><?php _e( 'Lower Menu', 'twentytwelve' ); ?></h3>
- <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>
- <?php wp_nav_menu( array( 'theme_location' =>'secondary','menu_class' =>'nav-menu','menu_id' => 'lower-menu','fallback_cb' => false ) ); ?>
- </nav><!-- #lower-navigation -->
- </header><!-- #masthead -->
- <div id="main" class="wrapper">
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement