Advertisement
Guest User

jadida header

a guest
Jun 21st, 2017
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.39 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html <?php language_attributes(); ?> prefix="og: http://ogp.me/ns#">
  3. <head>
  4. <meta charset="<?php bloginfo( 'charset' ); ?>" />
  5. <link rel="profile" href="http://gmpg.org/xfn/11" />
  6. <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
  7. <?php wp_head(); ?>
  8. </head>
  9. <?php global $is_IE ?>
  10. <body id="top" <?php body_class(); ?>>
  11.  
  12. <div class="wrapper-outer">
  13.  
  14. <?php if( tie_get_option('banner_bg_url') && tie_get_option('banner_bg') ): ?>
  15. <a href="<?php echo esc_url( tie_get_option('banner_bg_url') ) ?>" target="_blank" class="background-cover"></a>
  16. <?php else: ?>
  17. <div class="background-cover"></div>
  18. <?php endif; ?>
  19.  
  20. <?php if( tie_get_option( 'mobile_menu_active' ) ): ?>
  21. <aside id="slide-out">
  22.  
  23. <?php if( tie_get_option( 'mobile_menu_search' ) ): ?>
  24. <div class="search-mobile">
  25. <form method="get" id="searchform-mobile" action="<?php echo home_url(); ?>/">
  26. <button class="search-button" type="submit" value="<?php if( !$is_IE ) _eti( 'Search' ) ?>"><i class="fa fa-search"></i></button>
  27. <input type="text" id="s-mobile" name="s" title="<?php _eti( 'Search' ) ?>" value="<?php _eti( 'Search' ) ?>" onfocus="if (this.value == '<?php _eti( 'Search' ) ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _eti( 'Search' ) ?>';}" />
  28. </form>
  29. </div><!-- .search-mobile /-->
  30. <?php endif; ?>
  31.  
  32. <?php if( tie_get_option('mobile_menu_social') ):
  33. tie_get_social( true , false , 'ttip-none' ); ?>
  34. <?php endif; ?>
  35.  
  36. <div id="mobile-menu" <?php if( !tie_get_option('mobile_menu_hide_icons') ) echo' class="mobile-hide-icons"';?>></div>
  37. </aside><!-- #slide-out /-->
  38. <?php endif; ?>
  39.  
  40. <?php $full_width =''; if( tie_get_option( 'full_logo' )) $full_width = ' full-logo';
  41. $center_logo =''; if( tie_get_option( 'center_logo' )) $center_logo = ' center-logo';
  42. $theme_layout = 'boxed';
  43.  
  44. if( tie_get_option( 'theme_layout' ) == 'full' ) $theme_layout = 'wide-layout';
  45. if( tie_get_option( 'theme_layout' ) == 'boxed-all' ) $theme_layout = 'boxed-all';
  46. ?>
  47. <div id="wrapper" class="<?php echo $theme_layout ?>">
  48. <div class="inner-wrapper">
  49.  
  50. <header id="theme-header" class="theme-header<?php echo $full_width.$center_logo ?>">
  51. <?php if( tie_get_option( 'top_menu' ) ): ?>
  52. <div id="top-nav" class="top-nav">
  53. <div class="container">
  54.  
  55. <?php if(tie_get_option( 'top_date' )):
  56. if( tie_get_option('todaydate_format') ) $date_format = tie_get_option('todaydate_format');
  57. else $date_format = 'l , j F Y';
  58. ?>
  59. <span class="today-date"><?php echo date_i18n( $date_format , current_time( 'timestamp' ) ); ?></span><?php endif; ?>
  60.  
  61. <?php wp_nav_menu( array( 'container_class' => 'top-menu', 'theme_location' => 'top-menu' ) ); ?>
  62.  
  63. <?php if( tie_get_option( 'top_search' ) ): ?>
  64. <div class="search-block">
  65. <form method="get" id="searchform-header" action="<?php echo home_url(); ?>/">
  66. <button class="search-button" type="submit" value="<?php if( !$is_IE ) _eti( 'Search' ) ?>"><i class="fa fa-search"></i></button>
  67. <input class="search-live" type="text" id="s-header" name="s" title="<?php _eti( 'Search' ) ?>" value="<?php _eti( 'Search' ) ?>" onfocus="if (this.value == '<?php _eti( 'Search' ) ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _eti( 'Search' ) ?>';}" />
  68. </form>
  69. </div><!-- .search-block /-->
  70. <?php endif;
  71. if( tie_get_option('top_social') ):
  72. tie_get_social( true , false , 'ttip-none' ); ?>
  73. <?php endif; ?>
  74.  
  75. <?php tie_language_selector_flags(); ?>
  76.  
  77. </div><!-- .container /-->
  78. </div><!-- .top-menu /-->
  79. <?php endif; ?>
  80.  
  81. <div class="header-content">
  82.  
  83. <?php if( tie_get_option( 'mobile_menu_active' ) ): ?>
  84. <a id="slide-out-open" class="slide-out-open" href="#"><span></span></a>
  85. <?php endif; ?>
  86.  
  87. <?php
  88. if( is_category() || is_single() ){
  89. if( is_category() ) $category_id = get_query_var('cat') ;
  90. if( is_single() ){
  91. $categories = get_the_category( $post->ID );
  92. if( !empty( $categories[0]->term_id ) )
  93. $category_id = $categories[0]->term_id ;
  94. }
  95.  
  96. if( !empty( $category_id ) ){
  97. $tie_cats_options = get_option( 'tie_cats_options' );
  98. if( !empty( $tie_cats_options[ $category_id ] ) )
  99. $cat_options = $tie_cats_options[ $category_id ];
  100. }
  101. }
  102.  
  103. if( !empty($cat_options['cat_custom_logo']) ){
  104.  
  105. $logo_margin ='';
  106. if( !empty( $cat_options['logo_margin'] ) || !empty( $cat_options['logo_margin_bottom'] ) ){
  107. $logo_margin = ' style="';
  108. if( !empty( $cat_options['logo_margin'] ) )
  109. $logo_margin .= ' margin-top:'.$cat_options['logo_margin'].'px;';
  110. if( !empty( $cat_options['logo_margin_bottom'] ) )
  111. $logo_margin .= ' margin-bottom:'.$cat_options['logo_margin_bottom'].'px;';
  112. $logo_margin .= '"';
  113. }
  114. ?>
  115. <div class="logo"<?php echo $logo_margin ?>>
  116. <h2>
  117. <?php if( $cat_options['logo_setting'] == 'title' ): ?>
  118. <a href="<?php echo home_url() ?>/"><?php echo single_cat_title( '', false ) ?></a>
  119. <?php else : ?>
  120. <?php if( !empty($cat_options['logo']) ) $logo = $cat_options['logo'];
  121. elseif( tie_get_option( 'logo' ) ) $logo = tie_get_option( 'logo' );
  122. else $logo = get_stylesheet_directory_uri().'/images/logo.png';
  123. ?>
  124. <a title="<?php bloginfo('name'); ?>" href="<?php echo home_url(); ?>/">
  125. <img src="<?php echo $logo ; ?>" alt="<?php echo single_cat_title( '', false ) ?>" <?php if( $cat_options['logo_retina_width'] && $cat_options['logo_retina_height'] ) echo 'width="'.$cat_options['logo_retina_width'] .'" height="'.$cat_options['logo_retina_height'].'"'; ?> /><strong><?php echo single_cat_title( '', false ) ?></strong>
  126. </a>
  127. <?php endif; ?>
  128. </h2>
  129. </div><!-- .logo /-->
  130. <?php if( $cat_options['logo_retina'] && $cat_options['logo_retina_width'] && $cat_options['logo_retina_height']): ?>
  131. <script type="text/javascript">
  132. jQuery(document).ready(function($) {
  133. var retina = window.devicePixelRatio > 1 ? true : false;
  134. if(retina) {
  135. jQuery('#theme-header .logo img').attr('src', '<?php echo $cat_options['logo_retina']; ?>');
  136. jQuery('#theme-header .logo img').attr('width', '<?php echo $cat_options['logo_retina_width']; ?>');
  137. jQuery('#theme-header .logo img').attr('height', '<?php echo $cat_options['logo_retina_height']; ?>');
  138. }
  139. });
  140. </script>
  141. <?php endif; ?>
  142. <?php
  143. }else{
  144. $logo_margin ='';
  145. if( tie_get_option( 'logo_margin' ) || tie_get_option( 'logo_margin_bottom' ) ){
  146. $logo_margin = ' style="';
  147. if( tie_get_option( 'logo_margin' ) )
  148. $logo_margin .= ' margin-top:'.tie_get_option( 'logo_margin' ).'px;';
  149. if( tie_get_option( 'logo_margin_bottom' ) )
  150. $logo_margin .= ' margin-bottom:'.tie_get_option( 'logo_margin_bottom' ).'px;';
  151. $logo_margin .= '"';
  152. }
  153. ?>
  154. <div class="logo"<?php echo $logo_margin ?>>
  155. <?php if( is_home() || is_front_page() ) echo '<h1>'; else echo '<h2>'; ?>
  156. <?php if( tie_get_option('logo_setting') == 'title' ): ?>
  157. <a href="<?php echo home_url() ?>/"><?php bloginfo('name'); ?></a>
  158. <span><?php bloginfo( 'description' ); ?></span>
  159. <?php else : ?>
  160. <?php if( tie_get_option( 'logo' ) ) $logo = tie_get_option( 'logo' );
  161. else $logo = get_stylesheet_directory_uri().'/images/logo.png';
  162. ?>
  163. <a title="<?php bloginfo('name'); ?>" href="<?php echo home_url(); ?>/">
  164. <img src="<?php echo $logo ; ?>" alt="<?php bloginfo('name'); ?>" <?php if( tie_get_option('logo_retina_width') && tie_get_option('logo_retina_height') ) echo 'width="'.tie_get_option('logo_retina_width') .'" height="'.tie_get_option('logo_retina_height').'"'; ?> /><strong><?php bloginfo('name'); ?> <?php bloginfo( 'description' ); ?></strong>
  165. </a>
  166. <?php endif; ?>
  167. <?php if( is_home() || is_front_page() ) echo '</h1>'; else echo '</h2>'; ?>
  168. </div><!-- .logo /-->
  169. <?php if( tie_get_option( 'logo_retina' ) && tie_get_option( 'logo_retina_width' ) && tie_get_option( 'logo_retina_height' )): ?>
  170. <script type="text/javascript">
  171. jQuery(document).ready(function($) {
  172. var retina = window.devicePixelRatio > 1 ? true : false;
  173. if(retina) {
  174. jQuery('#theme-header .logo img').attr('src', '<?php echo tie_get_option( 'logo_retina' ); ?>');
  175. jQuery('#theme-header .logo img').attr('width', '<?php echo tie_get_option( 'logo_retina_width' ); ?>');
  176. jQuery('#theme-header .logo img').attr('height', '<?php echo tie_get_option( 'logo_retina_height' ); ?>');
  177. }
  178. });
  179. </script>
  180. <?php endif; ?>
  181. <?php } ?>
  182. <?php tie_banner('banner_top' , '<div class="e3lan e3lan-top">' , '</div>' ); ?>
  183. <div class="clear"></div>
  184.  
  185. </div>
  186. <?php $stick = ''; ?>
  187. <?php if( tie_get_option( 'stick_nav' ) ) $stick = ' class="fixed-enabled"' ?>
  188. <?php if( tie_get_option( 'main_nav' ) ): ?>
  189. <?php
  190. //UberMenu Support
  191. $navID = 'main-nav';
  192. if ( class_exists( 'UberMenu' ) ){
  193. $uberMenus = get_option( 'wp-mega-menu-nav-locations' );
  194. if( !empty($uberMenus) && is_array($uberMenus) && in_array("primary", $uberMenus)) $navID = 'main-nav-uber';
  195. }?>
  196. <nav id="<?php echo $navID; ?>"<?php echo $stick; ?>>
  197. <div class="container">
  198.  
  199. <?php if( tie_get_option( 'nav_logo' ) ): ?>
  200. <a class="main-nav-logo" title="<?php bloginfo('name'); ?>" href="<?php echo home_url(); ?>/">
  201. <img src="<?php echo tie_get_option( 'nav_logo' ) ?>" width="195" height="54" alt="<?php bloginfo('name'); ?>">
  202. </a>
  203. <?php endif ?>
  204.  
  205. <?php wp_nav_menu( array( 'container_class' => 'main-menu', 'theme_location' => 'primary', 'walker' => new tie_mega_menu_walker(), 'fallback_cb'=> false) ); ?>
  206. <?php if(tie_get_option( 'random_article' )): ?>
  207. <a href="<?php echo home_url(); ?>/?tierand=1" class="random-article ttip" title="<?php _eti( 'Random Article' ) ?>"><i class="fa fa-random"></i></a>
  208. <?php endif ?>
  209.  
  210. <?php if( tie_get_option( 'shopping_cart' ) && function_exists( 'is_woocommerce' ) ):
  211. global $woocommerce; ?>
  212. <a class="tie-cart ttip" href="<?php echo $woocommerce->cart->get_cart_url(); ?>" title="<?php _eti( 'View your shopping cart' ); ?>"><span class="shooping-count-outer"><?php if( isset( $woocommerce->cart->cart_contents_count ) && ( $woocommerce->cart->cart_contents_count != 0 ) ){ ?><span class="shooping-count"><?php echo $woocommerce->cart->cart_contents_count ?></span><?php } ?><i class="fa fa-shopping-cart"></i></span></a>
  213. <?php endif ?>
  214.  
  215. </div>
  216. </nav><!-- .main-nav /-->
  217. <?php endif; ?>
  218. </header><!-- #header /-->
  219.  
  220. <?php get_template_part( 'framework/parts/breaking-news' ); // Get Breaking News template ?>
  221.  
  222. <?php tie_banner('banner_below_header' , '<div class="e3lan e3lan-below_header">' , '</div>' ); ?>
  223.  
  224. <?php
  225. $sidebar = '';
  226. if( tie_get_option( 'sidebar_pos' ) == 'left' ) $sidebar = ' sidebar-left';
  227. if( is_singular() || ( function_exists( 'is_woocommerce' ) && is_woocommerce() ) ){
  228.  
  229. $current_ID = $post->ID;
  230. if( function_exists( 'is_woocommerce' ) && is_woocommerce() ) $current_ID = woocommerce_get_page_id('shop');
  231.  
  232. $get_meta = get_post_custom( $current_ID );
  233. if( !empty($get_meta["tie_sidebar_pos"][0]) ){
  234. $sidebar_pos = $get_meta["tie_sidebar_pos"][0];
  235.  
  236. if( $sidebar_pos == 'left' ) $sidebar = ' sidebar-left';
  237. elseif( $sidebar_pos == 'full' ) $sidebar = ' full-width';
  238. elseif( $sidebar_pos == 'right' ) $sidebar = ' sidebar-right';
  239. }
  240. }
  241. if( ( function_exists('is_bbpress') && is_bbpress() && tie_get_option( 'bbpress_full' )) || is_404() ) $sidebar = ' full-width';
  242. ?>
  243. <div id="main-content" class="container<?php echo $sidebar ; ?>">
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement