Advertisement
Guest User

Untitled

a guest
Feb 27th, 2014
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.36 KB | None | 0 0
  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_Eleven
  9. * @since Twenty Eleven 1.0
  10. */
  11. ?><!DOCTYPE html>
  12. <!--[if IE 6]>
  13. <html id="ie6" <?php language_attributes(); ?>>
  14. <![endif]-->
  15. <!--[if IE 7]>
  16. <html id="ie7" <?php language_attributes(); ?>>
  17. <![endif]-->
  18. <!--[if IE 8]>
  19. <html id="ie8" <?php language_attributes(); ?>>
  20. <![endif]-->
  21. <!--[if !(IE 6) | !(IE 7) | !(IE 8) ]><!-->
  22. <html <?php language_attributes(); ?>>
  23. <!--<![endif]-->
  24. <head>
  25. <a name="back-top"></a>
  26. <meta charset="<?php bloginfo( 'charset' ); ?>" />
  27. <meta name="viewport" content="width=device-width" />
  28. <title><?php
  29. /*
  30. * Print the <title> tag based on what is being viewed.
  31. */
  32. global $page, $paged;
  33.  
  34. wp_title( '|', true, 'right' );
  35.  
  36. // Add the blog name.
  37. bloginfo( 'name' );
  38.  
  39. // Add the blog description for the home/front page.
  40. $site_description = get_bloginfo( 'description', 'display' );
  41. if ( $site_description && ( is_home() || is_front_page() ) )
  42. echo " | $site_description";
  43.  
  44. // Add a page number if necessary:
  45. if ( $paged >= 2 || $page >= 2 )
  46. echo ' | ' . sprintf( __( 'Page %s', 'twentyeleven' ), max( $paged, $page ) );
  47.  
  48. ?></title>
  49. <link rel="profile" href="http://gmpg.org/xfn/11" />
  50. <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
  51. <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
  52. <!--[if lt IE 9]>
  53. <script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
  54. <![endif]-->
  55.  
  56. <!--[if IE]>
  57. <link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/styleIE.css" media="screen" type="text/css" />
  58. <![endif]-->
  59. <?php
  60. /* We add some JavaScript to pages with the comment form
  61. * to support sites with threaded comments (when in use).
  62. */
  63. if ( is_singular() && get_option( 'thread_comments' ) )
  64. wp_enqueue_script( 'comment-reply' );
  65.  
  66. /* Always have wp_head() just before the closing </head>
  67. * tag of your theme, or you will break many plugins, which
  68. * generally use this hook to add elements to <head> such
  69. * as styles, scripts, and meta tags.
  70. */
  71.  
  72. if (is_front_page())
  73. wp_enqueue_script('slider.js');
  74. wp_head();
  75. ?>
  76.  
  77. <script language="javascript">
  78. var slider_effect = '<?php echo get_option('nomnom_slider_effects'); ?>';
  79. var slider_speed = <?php echo get_option('nomnom_trans_speed'); ?>;
  80. var slider_pause = <?php echo get_option('nomnom_image_pause'); ?>;
  81. </script>
  82.  
  83.  
  84. </head>
  85.  
  86. <body <?php body_class(); ?>>
  87. <?php if (get_option( 'nomnom_advanced_style' )): ?><!-- switch for CSS3 effects -->
  88. <link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/css3.css" media="screen" type="text/css" />
  89. <?php endif; ?><!-- end nomnom_advanced_style -->
  90. <div id="page" class="hfeed">
  91. <header id="branding" role="banner">
  92.  
  93. <hgroup>
  94. <h1 id="site-title"><span><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></span></h1>
  95. <h2 id="site-description"><?php bloginfo( 'description' ); ?></h2>
  96. </hgroup>
  97. <!-- Begin secondary menu #access2 -->
  98. <nav id="access2" role="navigation">
  99. <h3 class="assistive-text"><?php _e( 'Secondary menu', 'twentyeleven' ); ?></h3>
  100. <?php /* Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff. */ ?>
  101. <div class="skip-link"><a class="assistive-text" href="#content" title="<?php esc_attr_e( 'Skip to primary content', 'twentyeleven' ); ?>"><?php _e( 'Skip to primary content', 'twentyeleven' ); ?></a></div>
  102. <div class="skip-link"><a class="assistive-text" href="#secondary" title="<?php esc_attr_e( 'Skip to secondary content', 'twentyeleven' ); ?>"><?php _e( 'Skip to secondary content', 'twentyeleven' ); ?></a></div>
  103. <?php // This is where the menu is added
  104. wp_nav_menu( array('container_class' => 'menu-top',
  105. 'theme_location' => 'secondary', 'fallback_cb' => '') ); ?>
  106. </nav><!-- end of #access2 -->
  107.  
  108. <div id="top-adsense">
  109. <?php include('adsense-header.php'); ?>
  110. </div><!-- end of #top-adsense -->
  111. <?php
  112. // Check to see if the header image has been removed
  113. $header_image = get_header_image();
  114. if ( ! empty( $header_image ) ) :
  115. ?>
  116. <div id="nomnom-header">
  117.  
  118. <?php
  119. // The header image
  120. // Check if this is a post or page, if it has a thumbnail, and if it's a big one
  121. if ( is_singular() &&
  122. has_post_thumbnail( $post->ID ) &&
  123. ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( HEADER_IMAGE_WIDTH, HEADER_IMAGE_WIDTH ) ) ) &&
  124. $image[1] >= HEADER_IMAGE_WIDTH ) :
  125. // Change the above number 10 to 0 if you want featured image displayed in the header when viewing posts
  126. echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' );
  127. elseif (is_front_page() && get_option("nomnom_has_slider")) :
  128. if (!nomnom_slider ()): ?>
  129. <a href="<?php echo esc_url( home_url( '/' ) ); ?>">
  130. <img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" />
  131. </a>
  132. <?php endif;
  133. else : ?>
  134. <a href="<?php echo esc_url( home_url( '/' ) ); ?>">
  135. <img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" />
  136. </a>
  137. <?php endif; // end check for featured image or standard header ?>
  138. </div>
  139.  
  140. <?php endif; // end check for removed header image ?>
  141.  
  142. <?php
  143. // Has the text been hidden?
  144. if ( 'blank' == get_header_textcolor() ) :
  145. ?>
  146. <div class="only-search<?php if ( ! empty( $header_image ) ) : ?> with-image<?php endif; ?>">
  147. <?php if (get_option( 'nomnom_display_search' )): ?><!-- search no text on/off switch -->
  148. <?php get_search_form(); ?>
  149. <?php endif; ?><!-- end search no text on/off -->
  150. </div>
  151. <?php
  152. else :
  153. ?>
  154. <?php if (get_option( 'nomnom_display_search' )): ?><!-- search with text on/off switch -->
  155. <?php get_search_form(); ?>
  156. <?php endif; ?>
  157. <?php endif; ?><!-- end search with text on/off -->
  158.  
  159. <nav id="access" role="navigation">
  160. <h3 class="assistive-text"><?php _e( 'Main menu', 'twentyeleven' ); ?></h3>
  161. <?php /* Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff. */ ?>
  162. <div class="skip-link"><a class="assistive-text" href="#content" title="<?php esc_attr_e( 'Skip to primary content', 'twentyeleven' ); ?>"><?php _e( 'Skip to primary content', 'twentyeleven' ); ?></a></div>
  163. <div class="skip-link"><a class="assistive-text" href="#secondary" title="<?php esc_attr_e( 'Skip to secondary content', 'twentyeleven' ); ?>"><?php _e( 'Skip to secondary content', 'twentyeleven' ); ?></a></div>
  164. <?php /* Our navigation menu. If one isn't filled out, wp_nav_menu falls back to wp_page_menu. The menu assiged to the primary position is the one used. If none is assigned, the menu with the lowest ID is used. */ ?>
  165. <?php if (get_option( 'nomnom_default_menu' )) wp_nav_menu( array( 'theme_location' => 'primary') ); ?>
  166.  
  167. </nav><!-- #access -->
  168.  
  169. </header><!-- #branding -->
  170.  
  171. <div id="main">
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement