Guest User

swatch header.php

a guest
Jan 30th, 2012
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.40 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. */
  8. global $woo_options;
  9. ?><!DOCTYPE html>
  10. <html <?php language_attributes(); ?>>
  11. <head>
  12. <meta charset="<?php bloginfo( 'charset' ); ?>" />
  13. <title><?php woo_title(); ?></title>
  14. <?php woo_meta(); ?>
  15. <link rel="stylesheet" type="text/css" href="<?php bloginfo( 'stylesheet_url' ); ?>" media="screen" />
  16. <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
  17.  
  18. <?php wp_head(); ?>
  19. <?php woo_head(); ?>
  20.  
  21. </head>
  22.  
  23. <body <?php body_class(); ?>>
  24. <?php woo_top(); ?>
  25.  
  26. <div id="wrapper">
  27.  
  28. <?php if ( function_exists( 'has_nav_menu' ) && has_nav_menu( 'top-menu' ) ) { ?>
  29.  
  30. <div id="top">
  31. <div class="col-full">
  32. <?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' ) ); ?>
  33. </div>
  34. </div><!-- /#top -->
  35.  
  36. <?php } ?>
  37. <div id="header">
  38. <div class="col-full">
  39. <div id="logo">
  40. <?php
  41. $logo = get_template_directory_uri() . '/images/logo.png';
  42. if ( isset( $woo_options['woo_logo'] ) && $woo_options['woo_logo'] != '' ) { $logo = $woo_options['woo_logo']; }
  43. ?>
  44. <?php if ( ! isset( $woo_options['woo_texttitle'] ) || $woo_options['woo_texttitle'] != 'true' ) { ?>
  45. <a href="<?php echo home_url( '/' ); ?>" title="<?php bloginfo( 'description' ); ?>">
  46. <img src="<?php echo $logo; ?>" alt="<?php bloginfo( 'name' ); ?>" />
  47. </a>
  48. <?php } ?>
  49.  
  50. <?php if( is_singular() && ! is_front_page() ) { ?>
  51. <span class="site-title"><a href="<?php echo home_url( '/' ); ?>"><?php bloginfo( 'name' ); ?></a></span>
  52. <?php } else { ?>
  53. <h1 class="site-title"><a href="<?php echo home_url( '/' ); ?>"><?php bloginfo( 'name' ); ?></a></h1>
  54. <?php }; ?>
  55. <span class="site-description"><?php bloginfo( 'description' ); ?></span>
  56.  
  57. </div><!-- /#logo -->
  58.  
  59. <div id="navigation" class="fr">
  60.  
  61. <?php
  62. if ( function_exists( 'has_nav_menu' ) && has_nav_menu( 'primary-menu' ) ) {
  63. wp_nav_menu( array( 'sort_column' => 'menu_order', 'container' => 'ul', 'menu_id' => 'main-nav', 'menu_class' => 'nav fl', 'theme_location' => 'primary-menu' ) );
  64. } else {
  65. ?>
  66. <ul id="main-nav" class="nav fl">
  67. <?php
  68. if ( get_option( 'woo_custom_nav_menu' ) == 'true' ) {
  69. if ( function_exists( 'woo_custom_navigation_output' ) )
  70. woo_custom_navigation_output( "name=Woo Menu 1" );
  71.  
  72. } else { ?>
  73.  
  74. <?php if ( is_page() ) { $highlight = "page_item"; } else { $highlight = "page_item current_page_item"; } ?>
  75. <li class="<?php echo $highlight; ?>"><a href="<?php echo home_url( '/' ); ?>"><?php _e( 'Home', 'woothemes' ); ?></a></li>
  76. <?php wp_list_pages( 'sort_column=menu_order&depth=6&title_li=&exclude=' ); ?>
  77.  
  78. <?php } ?>
  79. </ul><!-- /#nav -->
  80. <?php } ?>
  81. <?php if ( isset( $woo_options['woo_feed_url'] ) && $woo_options['woo_feed_url'] != '' ) { ?>
  82. <ul class="rss fr">
  83. <li class="sub-rss"><a href="<?php if ( $woo_options['woo_feed_url'] ) { echo $woo_options['woo_feed_url']; } else { echo get_bloginfo_rss( 'rss2_url' ); } ?>"><img src="<?php echo get_template_directory_uri(); ?>/images/ico-rss.png" alt="<?php bloginfo( 'name' ); ?>" /></a></li>
  84. </ul>
  85. <?php } ?>
  86.  
  87. </div><!-- /#navigation -->
  88.  
  89. </div><!--/.col-full-->
  90. </div><!--/#header-->
Add Comment
Please, Sign In to add comment