Want more features on Pastebin? Sign Up, it's FREE!
Guest

header.php

By: a guest on Feb 6th, 2013  |  syntax: None  |  size: 7.66 KB  |  views: 25  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2. include( TEMPLATEPATH . '/functions/content-vars.php');
  3.  
  4. // enable page-specific custom.css declarations ~ fetch this slug, the parent sluge, and grandparent slug.
  5. global $howling_dog_pagetypes;         
  6. if (is_array($howling_dog_pagetypes)) {
  7.         $page_template = get_post_meta( $post->ID, '_k9_template', true ); //check to see if k9-pagetype is being used
  8. }
  9. else{
  10.         $page_template = 0;
  11. }
  12. if ($page_template == '0' || $page_template == '') {
  13.         if ("http://" . $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"] == get_bloginfo('url') . '/') { $slug = 'frontpage'; }
  14.         elseif (get_bloginfo('url'). "/" . basename(get_permalink()) .'/' == $var['Error_url']) { $slug = '404'; }
  15.         else { $slug = basename(get_permalink()); }
  16. }                      
  17. else {
  18.         $slug = str_replace(' ','_',$page_template);
  19. }
  20. if ($var['custom_css'] != '') {
  21.         $slug .= ' custom';
  22. }
  23. ?><!DOCTYPE html>
  24. <!--[if IE 6]>
  25. <html id="ie6" <?php language_attributes(); ?>>
  26. <![endif]-->
  27. <!--[if IE 7]>
  28. <html id="ie7" <?php language_attributes(); ?>>
  29. <![endif]-->
  30. <!--[if IE 8]>
  31. <html id="ie8" <?php language_attributes(); ?>>
  32. <![endif]-->
  33. <!--[if !(IE 6) | !(IE 7) | !(IE 8)  ]><!-->
  34. <html <?php language_attributes(); ?>>
  35. <!--<![endif]-->
  36. <head>
  37. <meta http-equiv="Content-Type" content="<?php bloginfo ('html_type');?>;charset=<?php bloginfo ('charset');?>" />
  38. <title><?php bloginfo('name'); ?><?php wp_title(' | '); ?></title>
  39. <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
  40. <?php if (file_exists(STYLESHEETPATH.'/favicon.ico')) { ?><link rel="shortcut icon" href="<?php bloginfo('stylesheet_directory'); ?>/favicon.ico" /><?php } ?>
  41. <?php if ( is_singular() && comments_open() && (get_option('thread_comments') == 1)) wp_enqueue_script( 'comment-reply' ); ?>
  42.  
  43. <!-- WP HEAD -->    
  44. <?php wp_enqueue_script("jquery"); ?>
  45. <?php wp_head(); ?>
  46. <!-- /WP HEAD -->
  47.  
  48. <!-- HDT CORE -->
  49. <link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/includes/core.css.php" type="text/css" media="screen" />
  50. <?php if ( is_user_logged_in() && current_user_can('edit_posts') && $var['admin_bar'] == 'k9_admin_bar' ) { ?>
  51. <link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/functions/admin-bar/admin-bar.css" type="text/css" media="screen" />
  52. <?php } ?>
  53. <!--[if IE 7]><link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/includes/core-ie7.css.php" type="text/css" media="screen" />
  54. <![endif]-->
  55. <!--[if lte IE 6]><link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/includes/core-ie6.css.php" type="text/css" media="screen" />
  56. <![endif]-->
  57. <script src="<?php bloginfo('template_directory'); ?>/includes/resize.js" type="text/javascript"></script>
  58. <!-- /HDT CORE -->
  59.  
  60. <?php if ($var['cufon_script'] != '') { ?>
  61. <!-- DYNAMIC CUFON -->
  62. <script src="<?php bloginfo('template_directory'); ?>/includes/cufon-yui.js" type="text/javascript"></script>
  63. <script src="<?php bloginfo('stylesheet_directory'); ?>/cufon/<?php echo $var['cufonFileName']; ?>" type="text/javascript"></script>
  64.         <script type="text/javascript">
  65.                 <?php if ($var['cufon_title'] == '') { echo '//'; } ?>Cufon.replace('#header .title');
  66.                 <?php if ($var['cufon_subtitle'] == '') { echo '//'; } ?>Cufon.replace('#header .subtitle');
  67.                 <?php if ($var['cufon_sidetitle'] == '') { echo '//'; } ?>Cufon.replace('.sidetitle');
  68.                 <?php if ($var['cufon_h1'] == '') { echo '//'; } ?>Cufon.replace('#main h1', {hover:true});
  69.                 <?php if ($var['cufon_h2'] == '') { echo '//'; } ?>Cufon.replace('#main h2', {hover:true});
  70.                 <?php if ($var['cufon_h3'] == '') { echo '//'; } ?>Cufon.replace('#main h3', {hover:true});
  71.                 <?php if ($var['cufon_h4'] == '') { echo '//'; } ?>Cufon.replace('#main h4', {hover:true});    
  72.                 <?php if ($var['cufon_nav'] == '') { echo '//'; } ?>Cufon.replace('#nav li a', {hover:true});
  73.                        
  74.                 Cufon.replace('.cufon', {hover:true});
  75.         </script>
  76. <!-- /DYNAMIC CUFON -->
  77. <?php } ?>
  78.  
  79. <!-- <?php echo get_current_theme(); ?> STYLES -->
  80. <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
  81. <?php
  82. // If Custom CSS is on && K9 Vision is off, display Custom CSS
  83. if (($var['custom_css'] != '') && ($var['k9-vision'] !='on'))
  84. { ?>
  85. <link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/custom.css" type="text/css" media="screen" />
  86. <!--[if lte IE 8]><link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/ie8.css" type="text/css" media="screen" />
  87. <![endif]-->
  88. <!--[if lte IE 7]><link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/ie7.css" type="text/css" media="screen" />
  89. <![endif]-->
  90. <!--[if lte IE 6]><link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/ie6.css" type="text/css" media="screen" />
  91. <![endif]-->
  92. <?php } ?>
  93. <!-- /<?php echo get_current_theme(); ?> STYLES -->
  94.  
  95. <!-- <?php echo get_current_theme(); ?> SCRIPTS -->
  96. <?php k9_get_theme_scripts(); ?><!-- /<?php echo get_current_theme(); ?> SCRIPTS -->
  97.  
  98. <?php k9_get_hanger('meta/');?>
  99. <meta name="google-site-verification" content="EMv4pkRqynAVUBgiEMDp3XRMCqZedpeNNDgn3ie_UD4" />
  100. <!-- Put the following javascript before the closing </head> tag. -->
  101.  
  102. <script>
  103.   (function() {
  104.     var cx = 'partner-pub-6129614553433669:5155814153';
  105.     var gcse = document.createElement('script'); gcse.type = 'text/javascript'; gcse.async = true;
  106.     gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
  107.         '//www.google.com.au/cse/cse.js?cx=' + cx;
  108.     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(gcse, s);
  109.   })();
  110. </script>
  111. </head>
  112.  
  113. <body <?php body_class($slug); ?>>
  114.  
  115. <div id="admin">
  116.         <?php if ( is_user_logged_in() && current_user_can('edit_posts') && $var['admin_bar'] == 'k9_admin_bar' ) { include( TEMPLATEPATH . '/functions/admin-bar/admin-bar.php' ); } ?>
  117. </div>
  118.        
  119. <div id="container">
  120.  
  121. <?php if ($var['header_toggle'] == 'on') {
  122.         k9_get_hanger('header/before/'); ?>
  123.  
  124.     <div id="header">
  125.                 <div class="shrinkwrap">
  126.                 <?php if ($var['k9-vision'] == 'on') { ?> <div class="mvtext">Header (<?php echo $var['layout_width']; ?>px by <?php echo $var['header_height']; ?>px)</div><?php } else { ?>
  127.                         <div id="heading">
  128.                        
  129.                         <?php if ($var['header_logo_img'] != '') { ?><p class="ImagePos"><?php if ($var['header_logo_link'] != '') { ?><a href="<?php bloginfo('url'); ?>"><?php } ?><img src="<?php echo get_bloginfo('stylesheet_directory') . '/images/'.$var['header_logo_img']; ?>"><?php if ($var['header_logo_link'] != '') { ?></a><?php } ?></p><?php } ?>                            
  130.                         <?php if ($var['title'] != '') { ?>
  131.                         <a href="<?php bloginfo('url'); ?>"><?php echo '<span class="title">'.$var['title'].'</span></a>' ;} else { ?><span class="title"><?php bloginfo('name'); ?></span></a>
  132.                         <?php }?>
  133.                         <?php if ($var['subtitle'] != '') { echo '<span class="subtitle">'.$var['subtitle'].'</span>' ;} else { ?><span class="subtitle"><?php bloginfo('description'); ?></span><?php }?>
  134.                        
  135.                         </div>
  136.                        
  137.                         <?php dynamic_sidebar ('Header'); ?>
  138.                 <?php } ?>
  139.                 </div>
  140.     </div>
  141.      
  142. <?php k9_get_hanger('header/after/'); }?>
  143.  
  144. <?php if ($var['nav_toggle'] == 'on') {
  145.         k9_get_hanger('nav/before/'); ?>
  146.    
  147.     <div id="nav">
  148.                 <div class="shrinkwrap">
  149.                         <?php if ($var['k9-vision'] == 'on') { ?> <div class="mvtext">Navigation (<?php echo $var['layout_width']; ?>px by <?php echo $var['nav_height']; ?>px)</div><?php } else { ?>
  150.                         <div id="nav_align">
  151.                                 <?php wp_nav_menu( array( 'container_class' => 'suckerfishnav', 'theme_location' => 'primary', 'fallback_cb' => false, 'menu_class' => 'menu' ) ); ?>
  152.                                 <?php dynamic_sidebar('Navigation'); ?>
  153.                         </div>
  154.                         <?php } ?>
  155.                 </div>
  156.     </div>
  157.    
  158. <?php k9_get_hanger('nav/after/');  }?>  
  159.      
  160.     <div id="content">
  161.                 <div class="shrinkwrap">
clone this paste RAW Paste Data