Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Header Template
- *
- * Here we setup all logic and XHTML that is required for the header section of all screens.
- *
- * @package WooFramework
- * @subpackage Template
- */
- global $woo_options;
- ?><!DOCTYPE html>
- <html <?php language_attributes(); ?>>
- <head>
- <meta charset="<?php bloginfo( 'charset' ); ?>" />
- <title><?php woo_title(''); ?></title>
- <?php woo_meta(); ?>
- <?php if ( isset($woo_options['woo_alt_stylesheet']) && ( $woo_options['woo_alt_stylesheet'] == 'default.css' || $woo_options['woo_alt_stylesheet'] == '' ) ) { ?><link rel="stylesheet" type="text/css" href="<?php bloginfo( 'stylesheet_url' ); ?>" media="screen" /><?php } ?>
- <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
- <?php
- wp_head();
- woo_head();
- ?>
- <?php
- if ( isset( $woo_options['woo_content_width'] ) ) {
- $content_width = $woo_options['woo_content_width'];
- ?>
- <link rel="stylesheet" type="text/css" href="<?php echo get_stylesheet_directory_uri(); ?>/css/generator.php?content_width=<?php echo $content_width; ?>" media="screen" />
- <?php } ?>
- </head>
- <body <?php body_class(); ?>>
- <?php woo_top(); ?>
- <?php
- $floated_header = false;
- $floated_fixed_header = false;
- if ( isset( $woo_options['woo_floated_header'] ) && $woo_options['woo_floated_header'] == 'true' ) {
- $floated_header = true;
- if ( isset( $woo_options['woo_floated_fixed_header'] ) && $woo_options['woo_floated_fixed_header'] == 'true' ) {
- $floated_fixed_header = true;
- }
- }
- ?>
- <div id="wrapper" <?php if( $floated_header && $floated_fixed_header ) { echo 'class="floated-header fixed"'; } elseif ( $floated_header ) { echo 'class="floated-header"'; } ?>>
- <?php if ( function_exists( 'has_nav_menu' ) && has_nav_menu( 'top-menu' ) ) { ?>
- <div id="top">
- <nav class="col-full" role="navigation">
- <?php wp_nav_menu( array( 'depth' => 6, 'sort_column' => 'menu_order', 'container' => 'ul', 'menu_id' => 'top-nav', 'menu_class' => 'nav fl', 'theme_location' => 'top-menu' ) ); ?>
- </nav>
- </div><!-- /#top -->
- <?php } ?>
- <header id="header" class="col-full">
- <?php
- $logo = get_template_directory_uri() . '/images/logo.png';
- if ( isset( $woo_options['woo_logo'] ) && $woo_options['woo_logo'] != '' ) { $logo = $woo_options['woo_logo']; }
- ?>
- <?php if ( ! isset( $woo_options['woo_texttitle'] ) || $woo_options['woo_texttitle'] != 'true' ) { ?>
- <a id="logo" href="<?php bloginfo( 'url' ); ?>" title="<?php bloginfo( 'description' ); ?>">
- <img src="<?php echo $logo; ?>" alt="<?php bloginfo( 'name' ); ?>" />
- </a>
- <?php } ?>
- <hgroup>
- <h1 class="site-title"><a href="<?php bloginfo( 'url' ); ?>"><?php bloginfo( 'name' ); ?></a></h1>
- <h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
- <h3 class="nav-toggle"><a href="#navigation"><?php _e('Navigation', 'woothemes'); ?></a></h3>
- </hgroup>
- <nav id="navigation" role="navigation">
- <?php
- if ( function_exists( 'has_nav_menu' ) && has_nav_menu( 'primary-menu' ) ) {
- wp_nav_menu( array( 'depth' => 6, 'sort_column' => 'menu_order', 'container' => 'ul', 'menu_id' => 'main-nav', 'menu_class' => 'nav', 'theme_location' => 'primary-menu' ) );
- } else {
- ?>
- <ul id="main-nav" class="nav">
- <?php if ( is_page() ) $highlight = 'page_item'; else $highlight = 'page_item current_page_item'; ?>
- <li class="<?php echo $highlight; ?>"><a href="<?php echo home_url( '/' ); ?>"><?php _e( 'Home', 'woothemes' ); ?></a></li>
- <?php wp_list_pages( 'sort_column=menu_order&depth=6&title_li=&exclude=' ); ?>
- </ul><!-- /#nav -->
- <?php } ?>
- </nav><!-- /#navigation -->
- <?php woo_nav_after(); ?>
- <?php if ( isset( $woo_options['woo_header_search'] ) && $woo_options['woo_header_search'] == 'true' ) { ?>
- <div class="search_main fix">
- <form method="get" class="searchform" action="<?php echo home_url( '/' ); ?>" >
- <input type="text" class="field s" name="s" value="<?php esc_attr_e( 'Search…', 'woothemes' ); ?>" onfocus="if ( this.value == '<?php esc_attr_e( 'Search…', 'woothemes' ); ?>' ) { this.value = ''; }" onblur="if ( this.value == '' ) { this.value = '<?php esc_attr_e( 'Search…', 'woothemes' ); ?>'; }" />
- <input type="image" src="<?php echo get_template_directory_uri(); ?>/images/ico-search.png" class="search-submit" name="submit" alt="Submit" />
- <?php if ( is_woocommerce_activated() ) { ?>
- <input type="hidden" name="post_type" value="<?php echo $woo_options['woo_header_search_scope']; ?>" />
- <?php } ?>
- </form>
- </div><!--/.search_main-->
- <?php } elseif ( isset( $woo_options['woo_ad_top'] ) && $woo_options['woo_ad_top'] == 'true' ) { ?>
- <div id="topad">
- <?php
- if ( isset( $woo_options['woo_ad_top_adsense'] ) && $woo_options['woo_ad_top_adsense'] != '' ) {
- echo stripslashes( $woo_options['woo_ad_top_adsense'] );
- } else {
- if ( isset( $woo_options['woo_ad_top_url'] ) && isset( $woo_options['woo_ad_top_image'] ) )
- ?>
- <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>
- <?php } ?>
- </div><!-- /#topad -->
- <?php } ?>
- </header><!-- /#header -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement