Advertisement
seanxie

header language switcher problem

Mar 20th, 2013
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.17 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <!--[if IE 7]>
  3. <html class="ie ie7" <?php language_attributes(); ?>>
  4. <![endif]-->
  5. <!--[if IE 8]>
  6. <html class="ie ie8" <?php language_attributes(); ?>>
  7. <![endif]-->
  8. <!--[if !(IE 7) | !(IE 8) ]><!-->
  9. <html <?php language_attributes(); ?>>
  10. <!--<![endif]-->
  11. <head>
  12. <!-- social meta start -->
  13. <meta property="og: Zendo Media" content="Zendo Media" />
  14. <meta property="fb:admins" content="515159643"/>
  15. <meta itemprop="name" content="PPC, SEO & Social Media Training in London">
  16. <meta itemprop="description" content="A team of search engine & social media specialists dedicated to help you explore the potential of search engine and social media marketing">
  17. <meta property="og:image" content="http://www.zendo-media.com/wp-content/uploads/2012/12/Zendomedia-logo-new.jpg" />
  18. <!-- social meta end -->
  19. <title>Zendo Media - PPC, SEO and Social Media Training</title>
  20. <meta name="description" content="A team of search engine & social media marketing specialists dedicated to help you develop the potential of search engine and social media marketing for your business">
  21.  
  22. <!-- Basic Page Needs
  23. ================================================== -->
  24. <meta charset="<?php bloginfo( 'charset' ); ?>">
  25. <title><?php
  26. // Page or Single Post
  27. if ( is_page() or is_single() ) {
  28. the_title();
  29. // Category Archive
  30. } elseif ( is_category() ) {
  31. echo single_cat_title('', false);
  32. // Tag Archive
  33. } elseif ( function_exists('is_tag') and function_exists('single_tag_title') and is_tag() ) {
  34. printf( __('Tag: %s','Aqua'), single_tag_title('', false) );
  35. // General Archive
  36. } elseif ( is_archive() ) {
  37. printf( __('Archive: %s','Aqua'), wp_title('', false) );
  38. // Search Results
  39. } elseif ( is_search() ) {
  40. printf( __('Search: %s','Aqua'), get_query_var('s') );
  41. }
  42. // Insert separator for the titles above
  43. if ( !is_home() and !is_404() ) {
  44. echo " - ";
  45. }
  46. // Finally the blog name
  47. bloginfo('name');
  48. ?></title>
  49.  
  50. <meta name="description" content="<?php bloginfo('description'); ?>" />
  51.  
  52. <!-- Mobile Specific Metas
  53. ================================================== -->
  54. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  55.  
  56. <!-- CSS
  57. ================================================== -->
  58. <link rel="stylesheet" href="<?php bloginfo( 'stylesheet_url' ); ?>">
  59. <link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,400,300,600' rel='stylesheet' type='text/css'>
  60.  
  61. <?php
  62. $fonts_already_loaded = array("Open+Sans");
  63. $fonts_to_load = array();
  64.  
  65. // Load Nav Font
  66. if(!in_array(($nav_font = ot_get_option('nav_font_family')), $fonts_already_loaded)) {
  67. $fonts_to_load[] = $nav_font;
  68. }
  69. // Load Headings Font
  70. if(!in_array(($heading_font = ot_get_option('heading_font_family')), $fonts_already_loaded)) {
  71. $fonts_to_load[] = $heading_font;
  72. }
  73. // Load Buttons Font
  74. if(!in_array(($button_font = ot_get_option('button_font_family')), $fonts_already_loaded)) {
  75. $fonts_to_load[] = $button_font;
  76. }
  77.  
  78.  
  79.  
  80. // Loading fonts
  81. foreach($fonts_to_load as $font){
  82. echo "<link href='http://fonts.googleapis.com/css?family=".$font."' rel='stylesheet' type='text/css'>\n\t";
  83.  
  84. }
  85.  
  86.  
  87.  
  88. // Apply Dynamic CSS
  89. echo "<style type='text/css'>";
  90.  
  91. // Nav font family
  92. if($nav_font!="Open+Sans"){
  93. echo "
  94. #menu {
  95. font-family: '".str_replace('+',' ',$nav_font)."';
  96. }\n";
  97. }
  98. // Nav font size
  99. if(($nav_font_size=ot_get_option('nav_font_size'))!="16px"){
  100. echo "
  101. #menu > ul > li > a {
  102. font-size: ".$nav_font_size.";
  103. }
  104. #menu > ul > li ul > li > a {
  105. font-size: ".((int)(substr($nav_font_size,0,2)) - 2).'px'.";
  106. }\n";
  107. }
  108. // Custom Menu BGR color
  109. if( (($nav_bgr_color=get_theme_mod('nav_bgr_color'))!="#0ad1e5") && (get_theme_mod('main_menu_style') == 'custom_menu')){
  110. echo "
  111. .custom_menu #menu, .custom_menu #menu > ul > li > a {
  112. background-color: ".$nav_bgr_color.";
  113. }
  114. .custom_menu2 #menu > ul > li > a:hover, .custom_menu2 #menu > ul > li:hover > a, .custom_menu2 #menu > ul > li ul > li > a:hover > span {
  115. background-color: ".$nav_bgr_color.";
  116. }\n";
  117. }
  118.  
  119.  
  120. // Main Color
  121. if(($aqua_main_color=get_theme_mod('aqua_main_color'))!="#0ad1e5"){
  122. echo '
  123. a:hover, a:focus { color: '.$aqua_main_color.' ; }
  124. .button:hover,a:hover.button,button:hover,input[type="submit"]:hover,input[type="reset"]:hover, input[type="button"]:hover, .button_hilite, a.button_hilite { color: #fff; background-color: '.$aqua_main_color.' ;}
  125. .button_hilite, a.button_hilite { color: #fff; background-color: '.$aqua_main_color.' ;}
  126. .button_hilite:hover, a:hover.button_hilite { color: #fff; background-color: #374045;}
  127.  
  128. .section_big_title h1 strong { color: '.$aqua_main_color.' ;}
  129. .section_featured_texts h3 a:hover { color: '.$aqua_main_color.' ;}
  130.  
  131. .breadcrumb a:hover{ color: '.$aqua_main_color.' ;}
  132. .post_meta a:hover{ color: '.$aqua_main_color.' ;}
  133. .portfolio_filter div.current{ background-color: '.$aqua_main_color.' ;}
  134.  
  135. .next:hover,.prev:hover{ background-color: '.$aqua_main_color.' ;}
  136. .pagination .links a:hover{ background-color: '.$aqua_main_color.' ;}
  137. .hilite { background: '.$aqua_main_color.' ;}
  138.  
  139. .post_description blockquote{ border-left: 4px solid '.$aqua_main_color.'; }
  140.  
  141. .info h2{ background-color: '.$aqua_main_color.' ;}
  142. #footer a:hover { color: '.$aqua_main_color.' ;}
  143. #footer .boc_latest_post img:hover{ border: 3px solid '.$aqua_main_color.' ;}
  144.  
  145. .jcarousel-next-horizontal:hover, .jcarousel-prev-horizontal:hover { background-color: '.$aqua_main_color.' ;}
  146. '."\n";
  147. }
  148.  
  149.  
  150.  
  151. // Headings font family
  152. if($heading_font!="Open+Sans"){
  153. echo "
  154. h1, h2, h3, h4, h5, .title, .section_big_title h1, .heading, #footer h3 {
  155. font-family: '".str_replace('+',' ',$heading_font)."';
  156. }\n";
  157. }
  158. // Button font family
  159. if($button_font!="Open+Sans"){
  160. echo "
  161. .button, a.button, button, input[type='submit'], input[type='reset'], input[type='button'] {
  162. font-family: '".str_replace('+',' ',$button_font)."';
  163. }\n";
  164. }
  165. // Body font family
  166. $body_font = ot_get_option('body_font_family');
  167. if($body_font!="Open+Sans"){
  168. echo "
  169. body {
  170. font-family: '".str_replace('+',' ',$body_font)."';
  171. }\n";
  172. }
  173.  
  174. // Breadcrumbs
  175. if(!$boc_breadcrumb = ot_get_option('breadcrumbs')){
  176. echo "
  177. .breadcrumb {
  178. display: none;
  179. }\n";
  180. }
  181.  
  182. // Custom CSS
  183. if($boc_custom_css = ot_get_option('custom_css')){
  184. echo "\n\n".$boc_custom_css."\n";
  185. }
  186.  
  187.  
  188. echo "\t</style>";
  189. ?>
  190.  
  191.  
  192. <!-- JS
  193. ================================================== -->
  194.  
  195. <?php wp_enqueue_script('jquery'); ?>
  196. <?php wp_enqueue_script('jquery.easing', get_template_directory_uri().'/js/jquery.easing.1.3.js'); ?>
  197. <?php wp_enqueue_script('aqua.common', get_template_directory_uri().'/js/aqua.common.js'); ?>
  198. <?php wp_enqueue_script('jquery.quicksand', get_template_directory_uri().'/js/jquery.quicksand.js'); ?>
  199. <?php wp_enqueue_script('jquery.flexslider', get_template_directory_uri().'/js/jquery.flexslider-min.js'); ?>
  200. <?php wp_enqueue_script('jquery.prettyPhoto', get_template_directory_uri().'/js/jquery.prettyPhoto.js'); ?>
  201. <?php wp_enqueue_script('jquery.jcarousel', get_template_directory_uri().'/js/jquery.jcarousel.min.js'); ?>
  202. <?php wp_enqueue_script('jquery.tipsy', get_template_directory_uri().'/js/jquery.tipsy.js'); ?>
  203. <!--[if lt IE 9]>
  204. <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
  205. <![endif]-->
  206.  
  207. <!-- Favicons
  208. ================================================== -->
  209. <link rel="icon" type="image/x-icon" href="<?php echo ot_get_option('favicon_uploaded', get_template_directory_uri().'/images/favicon.png')?>">
  210.  
  211. <?php wp_head(); ?>
  212.  
  213. <script type="text/javascript">
  214.  
  215. var _gaq = _gaq || [];
  216. _gaq.push(['_setAccount', 'UA-36170592-3']);
  217. _gaq.push(['_trackPageview']);
  218.  
  219. (function() {
  220. var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  221. ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';
  222. var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  223. })();
  224.  
  225. </script>
  226.  
  227. <meta name="google-site-verification" content="GrqAluCNiCdV99xp9g0zTlEaclRwyVjqWGeU6el92_Q" />
  228.  
  229. </head>
  230. <body <?php body_class(); ?>>
  231. <div id="wrapper"<?php echo (ot_get_option('wrapper_style')=='full_width'? ' class="full_wrapper"' : '');?>>
  232.  
  233. <!-- Container -->
  234. <div class="container">
  235.  
  236. <div class="header row">
  237. <div class="eight columns header_left">
  238. <?php $logo = ot_get_option('logo_upload');
  239. $top_margin = ot_get_option('logo_top_margin');
  240. $left_margin = ot_get_option('logo_left_margin');
  241. if(isset($top_margin) && is_array($top_margin)){
  242. $logo_extra_style = ($top_margin[0] || $left_margin[0]) ? 1 : 0;
  243. }else{
  244. $logo_extra_style ='';
  245. }
  246.  
  247. if($logo) { ?>
  248. <a href="<?php echo home_url('/'); ?>" title="<?php echo esc_attr(get_bloginfo('name', 'display')); ?>" rel="home">
  249. <img src="<?php echo $logo; ?>" <?php echo $logo_extra_style ? "style='". ($top_margin[0] ? 'margin-top: '.$top_margin[0].$top_margin[1].';' : '') . ($left_margin[0] ? 'margin-left: '.$left_margin[0].$left_margin[1].';' : '')."'" : ""; ?> alt="<?php bloginfo('name'); ?>"/>
  250. </a>
  251. <?php } else { ?>
  252. <h1 class="logo" <?php echo $logo_extra_style ? "style='". ($top_margin[0] ? 'margin-top: '.$top_margin[0].$top_margin[1].';' : '') . ($left_margin[0] ? 'margin-left: '.$left_margin[0].$left_margin[1].';' : '')."'" : ""; ?>>
  253. <a href="<?php echo home_url('/'); ?>" title="<?php echo esc_attr(get_bloginfo('name', 'display')); ?>" rel="home"><?php bloginfo('name'); ?></a>
  254. <div class="tagline"><?php echo get_bloginfo ( 'description' ); ?></div>
  255. </h1>
  256. <?php } ?>
  257. </div>
  258. <div class="eight columns">
  259. <div class="header_right">
  260. <div class="header_contacts clearfix">
  261. <?php if($header_phone = ot_get_option('header_phone')){?>
  262. <div class="header_phone"><?php echo $header_phone;?></div>
  263. <?php } ?>
  264. <?php if($header_email = ot_get_option('header_email')){?>
  265. <div class="header_mail"><?php echo $header_email;?></div>
  266. <?php } ?>
  267.  
  268. </div>
  269. <div class="header_soc_search clearfix">
  270. <div class="header_search">
  271. <form class="search" action="<?php echo home_url(); ?>/" method="get">
  272. <button class="button_search"></button>
  273. <input name="s" id="s" type="text" value="<?php echo ($s ? $s : __('Search', 'Aqua').'...'); ?>" onclick="this.value = '';"></span>
  274. </form>
  275.  
  276. </div>
  277.  
  278. <?php if(is_array($header_icons = ot_get_option('header_icons'))){
  279. $header_icons = array_reverse($header_icons);
  280. foreach($header_icons as $header_icon){
  281. echo "<a href='". ( $header_icon['icons_service']!='rss' ? $header_icon['icons_url'] : get_bloginfo('rss2_url') )."' class='header_soc_". $header_icon['icons_service'] ."' title='". $header_icon['title'] ."'>". $header_icon['icons_service'] ."</a>";
  282. }
  283. }
  284. ?>
  285.  
  286. </div>
  287. </div>
  288. </div>
  289. </div>
  290.  
  291. <!-- Main Navigation -->
  292. <div class="row no_bm">
  293. <div class="<?php echo get_theme_mod('main_menu_style'); ?> sixteen columns">
  294.  
  295. <?php wp_nav_menu( array(
  296. 'theme_location'=> 'main_navigation',
  297. 'container_id' => 'menu',
  298. 'menu_class' => '',
  299. 'walker' => new boc_Menu_Walker,
  300. 'fallback_cb' => 'menuFallBack',
  301. 'items_wrap' => '<ul><li><a href="'.home_url('/').'"><span class="home_icon"></span></a></li>%3$s</ul>',
  302. ));?>
  303.  
  304. <?php wp_nav_menu( array(
  305. 'theme_location'=> 'main_navigation',
  306. 'container' => '',
  307. 'menu_class' => '',
  308. 'walker' => new boc_Menu_Select_Walker,
  309. 'fallback_cb' => 'menuSelectFallBack',
  310. 'items_wrap' => '<select id="select_menu" onchange="location = this.value"><option value="">Select Page</option>%3$s</select>',
  311. ));?>
  312.  
  313. </div>
  314. </div>
  315. <!-- Main Navigation::END -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement