Advertisement
Guest User

Header.php

a guest
Sep 23rd, 2014
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.63 KB | None | 0 0
  1. <?php
  2.  
  3. if( semi_option( 'comingsoon' ) == 1 ):
  4.  
  5. if( !is_page_template( 'template-comingsoon.php' ) AND !is_404() AND !current_user_can( 'edit_published_posts' ) AND ( semi_option( 'comingsoon_page' ) != '' AND semi_option( 'comingsoon_page' ) != 0 AND check_currenturl() != get_permalink( semi_option( 'comingsoon_page' ) ) ) ):
  6.  
  7. wp_redirect( get_permalink( semi_option( 'comingsoon_page' ) ) );
  8. exit;
  9.  
  10. endif;
  11.  
  12. endif;
  13.  
  14. ?>
  15. <!DOCTYPE html>
  16. <html <?php language_attributes(); ?>>
  17.  
  18. <!-- ============================================
  19. Head
  20. ============================================= -->
  21. <head>
  22.  
  23.  
  24. <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
  25. <meta name="author" content="Brandon Lavender" />
  26.  
  27.  
  28. <!-- ============================================
  29. Document Title
  30. ============================================= -->
  31. <title><?php wp_title('|', true, 'right'); ?></title>
  32.  
  33.  
  34. <link rel="profile" href="http://gmpg.org/xfn/11" />
  35. <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
  36.  
  37. <?php if( semi_option( 'nonresponsive' ) != 1 ): ?>
  38.  
  39. <!-- ============================================
  40. Responsive
  41. ============================================= -->
  42. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
  43.  
  44. <!--[if lt IE 9]>
  45. <script src="http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script>
  46. <![endif]-->
  47.  
  48. <?php endif; ?>
  49.  
  50. <!-- ============================================
  51. WP Head
  52. ============================================= -->
  53. <?php wp_head(); ?>
  54.  
  55. </head>
  56.  
  57. <!-- ============================================
  58. Body
  59. ============================================= -->
  60. <body <?php if( semi_option( 'layout' ) == 'full' AND !is_page_template( 'template-comingsoon.php' ) ) { body_class( 'stretched' ); } else { body_class(); } ?>>
  61.  
  62. <?php if( is_singular() AND ( semi_option('blog_comments_type') == 'facebook' OR get_post_meta( get_queried_object_id(), 'semi_post_comments_system', TRUE ) == 'facebook' ) ): ?>
  63.  
  64. <div id="fb-root"></div>
  65. <script>(function(d, s, id) {
  66. var js, fjs = d.getElementsByTagName(s)[0];
  67. if (d.getElementById(id)) return;
  68. js = d.createElement(s); js.id = id;
  69. js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=<?php echo semi_option('facebook_app'); ?>";
  70. fjs.parentNode.insertBefore(js, fjs);
  71. }(document, 'script', 'facebook-jssdk'));</script>
  72.  
  73. <?php endif; ?>
  74.  
  75. <?php
  76.  
  77. if( SM_WOOCOMMERCE_ACTIVE ):
  78.  
  79. global $woocommerce; ?>
  80.  
  81. <div id="fshopping-cart-wrap">
  82.  
  83. <div id="fshopping-cart" class="clearfix">
  84.  
  85. <?php if ( sizeof( $woocommerce->cart->cart_contents ) > 0 ): ?>
  86.  
  87. <div id="fshop-cart-trigger">
  88. <i class="icon-shopping-cart"></i>
  89. <div id="fshop-cart-qty"><?php echo $woocommerce->cart->cart_contents_count; ?></div>
  90. </div>
  91.  
  92. <h3><?php printf( _n('%d item in Shopping Cart', '%d items in Shopping Cart', $woocommerce->cart->cart_contents_count, 'coworker'), $woocommerce->cart->cart_contents_count); ?></h3>
  93.  
  94. <div id="mini-cart-items">
  95.  
  96. <?php foreach( $woocommerce->cart->cart_contents as $cart_item_key => $cart_item ) {
  97.  
  98. $product_item = $cart_item['data'];
  99. $product_title = $product_item->get_title();
  100.  
  101. ?>
  102.  
  103. <?php if ( $product_item->exists() && $cart_item['quantity'] > 0 ) { ?>
  104.  
  105. <div class="mini-cart-item clearfix">
  106. <div class="mini-cart-item-image">
  107. <a href="<?php echo get_permalink( $cart_item['product_id'] ); ?>"><?php echo $product_item->get_image(); ?></a>
  108. </div>
  109. <div class="mini-cart-item-desc">
  110. <a href="<?php echo get_permalink( $cart_item['product_id'] ); ?>"><?php echo apply_filters('woocommerce_cart_widget_product_title', $product_title, $product_item); ?></a>
  111. <span class="mini-cart-item-price"><?php echo woocommerce_price( $product_item->get_price() ); ?></span>
  112. <span class="mini-cart-item-quantity">x <?php echo $cart_item['quantity']; ?></span>
  113. </div>
  114. </div>
  115.  
  116. <?php } } ?>
  117.  
  118. </div>
  119.  
  120. <div class="mini-checkout-wrap">
  121. <span class="fleft mini-checkout-price"><?php echo $woocommerce->cart->get_cart_total(); ?></span>
  122. <a href="<?php echo $woocommerce->cart->get_cart_url(); ?>" title="<?php _e('View your Shopping Cart', 'coworker'); ?>" class="fright nomargin simple-button"><?php _e('View Cart', 'coworker'); ?></a>
  123. </div>
  124.  
  125. <?php else: ?>
  126.  
  127. <h3><?php _e( 'Shopping Cart Empty.!', 'coworker' ); ?></h3>
  128.  
  129. <div id="mini-cart-items">
  130.  
  131. <div class="mini-cart-item clearfix"><?php _e( 'Sorry, your Shopping Cart seems to be Empty.!', 'coworker' ); ?></div>
  132.  
  133. </div>
  134.  
  135. <div class="mini-checkout-wrap">
  136. <a href="<?php echo get_permalink( woocommerce_get_page_id( 'shop' ) ); ?>" title="<?php _e('Start Shopping', 'coworker'); ?>" class="divcenter nomargin simple-button"><?php _e('Start Shopping', 'coworker'); ?></a>
  137. </div>
  138.  
  139. <?php endif; ?>
  140.  
  141. </div>
  142.  
  143. </div>
  144.  
  145. <script type="text/javascript">
  146.  
  147. jQuery(window).load(function(){
  148.  
  149. fshopCartTrigger();
  150.  
  151. });
  152.  
  153. </script>
  154.  
  155. <?php endif; ?>
  156.  
  157. <div id="wrapper" class="clearfix">
  158.  
  159. <?php if( semi_option( 'sticky_menu' ) == 1 AND !is_page_template( 'template-comingsoon.php' ) ): ?>
  160.  
  161. <div id="sticky-menu" class="clearfix">
  162.  
  163. <div class="container clearfix">
  164.  
  165. <div class="sticky-logo">
  166.  
  167. <a href="<?php echo home_url('/'); ?>"><img src="<?php echo semi_option( 'sticky_logo' ) ? semi_option( 'sticky_logo' ) : semi_option( 'logo' ); ?>" alt="<?php echo get_bloginfo('name'); ?>" title="<?php echo get_bloginfo('name'); ?>" /></a>
  168.  
  169. </div>
  170.  
  171. <div class="sticky-search-trigger">
  172.  
  173. <a href="#"><i class="icon-search"></i></a>
  174.  
  175. </div>
  176.  
  177. <div class="sticky-menu-wrap">
  178.  
  179. <?php
  180.  
  181. if( has_nav_menu( 'sticky' ) ) {
  182. $stickymenu = 'sticky';
  183. } else {
  184. $stickymenu = 'primary';
  185. }
  186.  
  187. wp_nav_menu( array(
  188. 'theme_location' => $stickymenu,
  189. 'container' => '',
  190. 'fallback_cb' => '',
  191. 'walker' => new pmenu_subtitle_walker2()
  192. ) );
  193. ?>
  194.  
  195. </div>
  196.  
  197. <div class="sticky-search-area">
  198.  
  199. <form action="<?php echo home_url( '/' ); ?>" method="get" role="search" id="sticky-search">
  200.  
  201. <input type="text" id="sticky-search-input" name="s" placeholder="<?php _e( 'Type &amp; Hit Enter', 'coworker' ); ?>" value="" />
  202.  
  203. </form>
  204.  
  205. <div class="sticky-search-area-close">
  206.  
  207. <a href="#"><i class="icon-remove"></i></a>
  208.  
  209. </div>
  210.  
  211. </div>
  212.  
  213. </div>
  214.  
  215. </div>
  216.  
  217. <?php endif; ?>
  218.  
  219. <?php if( semi_option( 'topbar' ) == 1 AND semi_option( 'header_style' ) != 'header2' ): ?>
  220.  
  221. <div id="top-bar" <?php if( semi_option( 'topbar_content' ) == 'social-menu' ) { echo 'class="top-bar2"'; } ?>>
  222.  
  223. <div class="container clearfix">
  224.  
  225. <div id="top-menu">
  226.  
  227. <?php
  228. wp_nav_menu( array(
  229. 'theme_location' => 'top',
  230. 'container' => '',
  231. 'fallback_cb' => '',
  232. 'walker' => new topmenu_walker()
  233. ) );
  234. ?>
  235.  
  236. </div>
  237.  
  238. <?php get_header_icons(); ?>
  239.  
  240. </div>
  241.  
  242. </div>
  243.  
  244. <?php endif; ?>
  245.  
  246. <div id="header" <?php get_header_class(); ?>>
  247.  
  248.  
  249. <div class="container clearfix">
  250.  
  251.  
  252. <div id="logo">
  253.  
  254. <a href="<?php echo home_url('/'); ?>" class="standard-logo"><img src="<?php echo semi_option( 'logo' ); ?>" alt="<?php echo get_bloginfo('name'); ?>" title="<?php echo get_bloginfo('name'); ?>" /></a>
  255. <a href="<?php echo home_url('/'); ?>" class="retina-logo"><img src="<?php echo semi_option( 'retinalogo' ); ?>" alt="<?php echo get_bloginfo('name'); ?>" title="<?php echo get_bloginfo('name'); ?>" width="<?php echo semi_option( 'logo_width' ); ?>" height="<?php echo semi_option( 'logo_height' ); ?>" /></a>
  256.  
  257. </div>
  258.  
  259. <?php if( is_page_template( 'template-comingsoon.php' ) ):
  260.  
  261. get_top_contacts();
  262.  
  263. else:
  264.  
  265. get_header_menu();
  266.  
  267. get_header_rightcontent();
  268.  
  269. endif; ?>
  270.  
  271. </div>
  272.  
  273.  
  274. <?php if( !is_page_template( 'template-comingsoon.php' ) ):
  275.  
  276. get_header_menu2();
  277.  
  278. endif; ?>
  279.  
  280. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement