Advertisement
sgodar

Wikeasi Header

Apr 6th, 2012
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.33 KB | None | 0 0
  1. <?php
  2. /**
  3.  * Header Template
  4.  *
  5.  * Here we setup all logic and XHTML that is required for the header section of all screens.
  6.  *
  7.  * @package WooFramework
  8.  * @subpackage Template
  9.  */
  10.  
  11.  global $woo_options;
  12.  
  13. ?><!DOCTYPE html>
  14. <html <?php language_attributes(); ?>>
  15. <head>
  16.  
  17. <meta charset="<?php bloginfo( 'charset' ); ?>" />
  18.  
  19. <meta name="google-site-verification" content="UOvo0cbZepwcNuw2uNi9UIvvgVUOKkYEkztBcr8Rfe0" />
  20. <meta name="alexaVerifyID" content="l3cofF8Fi3sD9mURCHOL0X7-v0g" />
  21. <meta name="msvalidate.01" content="2DAE2D824ECA745EF03C81EB3E825454" />
  22.  
  23. <title><?php woo_title(); ?></title>
  24.  
  25. <!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame -->
  26. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  27.  
  28. <?php woo_meta(); ?>
  29.  
  30. <link rel="stylesheet" type="text/css" href="<?php bloginfo( 'stylesheet_url' ); ?>" media="screen" />
  31. <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
  32.  
  33. <?php
  34.     wp_head();
  35.     woo_head();
  36. ?>
  37.  
  38.  
  39. <script type="text/javascript">
  40.  
  41.   var _gaq = _gaq || [];
  42.   _gaq.push(['_setAccount', 'UA-9393688-14']);
  43.   _gaq.push(['_trackPageview']);
  44.  
  45.   (function() {
  46.     var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  47.     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  48.     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  49.   })();
  50.  
  51. </script>
  52.  
  53.  
  54. </head>
  55.  
  56. <body <?php body_class(); ?>>
  57. <?php woo_top(); ?>
  58.  
  59. <div id="wrapper">
  60.  
  61.     <?php if ( function_exists( 'has_nav_menu' ) && has_nav_menu( 'top-menu' ) ) { ?>
  62.  
  63.     <div id="top">
  64.         <nav class="col-full" role="navigation">
  65.             <div class="fr">
  66.             <?php wp_nav_menu( array( 'depth' => 6, 'sort_column' => 'menu_order', 'container' => 'ul', 'menu_id' => 'top-nav', 'menu_class' => 'nav', 'theme_location' => 'top-menu' ) ); ?>
  67.  
  68.             <ul class="rss">
  69.             <?php
  70.                 $email = '';
  71.                 $rss = get_bloginfo_rss( 'rss2_url' );
  72.  
  73.                 if ( isset( $woo_options['woo_subscribe_email'] ) && ( $woo_options['woo_subscribe_email'] != '' ) ) {
  74.                     $email = $woo_options['woo_subscribe_email'];
  75.                 }
  76.  
  77.                 if ( isset( $woo_options['woo_feed_url'] ) && ( $woo_options['woo_feed_url'] != '' ) ) {
  78.                     $rss = $woo_options['woo_feed_url'];
  79.                 }
  80.  
  81.                 if ( $email != '' ) {
  82.             ?>
  83.             <li class="sub-email"><a href="<?php echo esc_url( $email ); ?>" target="_blank"><?php _e( 'Email', 'woothemes' ); ?></a> |</li>
  84.             <?php } ?>
  85.             <li class="sub-rss"><a href="<?php echo $rss; ?>"><?php _e( 'RSS', 'woothemes' ); ?></a></li>
  86.         </ul>
  87.         </div><!-- /.fr -->
  88.         </nav>
  89.     </div><!-- /#top -->
  90.  
  91.     <?php } ?>
  92.  
  93.     <header id="header" class="col-full">
  94.  
  95.         <?php
  96.             $logo = get_template_directory_uri() . '/images/logo.png';
  97.             if ( isset( $woo_options['woo_logo'] ) && $woo_options['woo_logo'] != '' ) { $logo = $woo_options['woo_logo']; }
  98.         ?>
  99.         <?php if ( ! isset( $woo_options['woo_texttitle'] ) || $woo_options['woo_texttitle'] != 'true' ) { ?>
  100.             <a id="logo" href="<?php echo home_url( '/' ); ?>" title="<?php bloginfo( 'description' ); ?>">
  101.                 <img src="<?php echo $logo; ?>" alt="<?php bloginfo( 'name' ); ?>" />
  102.             </a>
  103.         <?php } ?>
  104.  
  105.         <hgroup>
  106.  
  107.             <h1 class="site-title"><a href="<?php echo home_url( '/' ); ?>"><?php bloginfo( 'name' ); ?></a></h1>
  108.             <h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
  109.  
  110.         </hgroup>
  111.  
  112.         <?php if ( isset( $woo_options['woo_ad_top'] ) && $woo_options['woo_ad_top'] == 'true' ) { ?>
  113.         <div id="topad">
  114.             <?php
  115.                 if ( isset( $woo_options['woo_ad_top_adsense'] ) && $woo_options['woo_ad_top_adsense'] != '' ) {
  116.                     echo stripslashes( $woo_options['woo_ad_top_adsense'] );
  117.                 } else {
  118.                     if ( isset( $woo_options['woo_ad_top_url'] ) && isset( $woo_options['woo_ad_top_image'] ) )
  119.             ?>
  120.                 <a href="<?php echo $woo_options['woo_ad_top_url']; ?>"><img src="<?php echo $woo_options['woo_ad_top_image']; ?>" width="468" height="60" alt="advert" /></a>
  121.             <?php } ?>
  122.         </div><!-- /#topad -->
  123.         <?php } ?>
  124.  
  125.         <?php if ( $woo_options['woo_ad_top'] == 'false' ) { ?>
  126.     <nav id="navigation" class="center fr" role="navigation">
  127.         <?php
  128.         if ( function_exists( 'has_nav_menu' ) && has_nav_menu( 'primary-menu' ) ) {
  129.             wp_nav_menu( array( 'depth' => 6, 'sort_column' => 'menu_order', 'container' => 'ul', 'menu_id' => 'main-nav', 'menu_class' => 'nav fr', 'theme_location' => 'primary-menu' ) );
  130.         } else {
  131.         ?>
  132.         <ul id="main-nav" class="nav">
  133.             <?php
  134.             if ( isset($woo_options['woo_custom_nav_menu'] ) && $woo_options['woo_custom_nav_menu'] == 'true' ) {
  135.                 if ( function_exists( 'woo_custom_navigation_output' ) )
  136.                     woo_custom_navigation_output();
  137.             } else { ?>
  138.                 <?php if ( is_page() ) $highlight = 'page_item'; else $highlight = 'page_item current_page_item'; ?>
  139.                 <li class="<?php echo $highlight; ?>"><a href="<?php echo home_url( '/' ); ?>"><?php _e( 'Home', 'woothemes' ); ?></a></li>
  140.                 <?php
  141.                     wp_list_pages( 'sort_column=menu_order&depth=6&title_li=&exclude=' );
  142.             }
  143.             ?>
  144.         </ul><!-- /#nav -->
  145.         <?php } ?>
  146.  
  147.     </nav><!-- /#navigation -->
  148.         <?php } ?>
  149.  
  150.     </header><!-- /#header -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement