1. childtheme header.php
  2. <!DOCTYPE html>
  3. <!--[if lt IE 7 ]><html class="ie ie6" <?php language_attributes();?>> <![endif]-->
  4. <!--[if IE 7 ]><html class="ie ie7" <?php language_attributes();?>> <![endif]-->
  5. <!--[if IE 8 ]><html class="ie ie8" <?php language_attributes();?>> <![endif]-->
  6. <!--[if IE 9 ]><html class="ie ie9" <?php language_attributes();?>> <![endif]-->
  7. <!--[if (gt IE 9)|!(IE)]><!--><html <?php language_attributes();?>> <!--<![endif]-->
  8. <head>
  9. <title><?php if ( is_category() ) {
  10. echo theme_locals("category_for")." &quot;"; single_cat_title(); echo '&quot; | '; bloginfo( 'name' );
  11. } elseif ( is_tag() ) {
  12. echo theme_locals("tag_for")." &quot;"; single_tag_title(); echo '&quot; | '; bloginfo( 'name' );
  13. } elseif ( is_archive() ) {
  14. wp_title(''); echo " ".theme_locals("archive")." | "; bloginfo( 'name' );
  15. } elseif ( is_search() ) {
  16. echo theme_locals("fearch_for")." &quot;".esc_html($s).'&quot; | '; bloginfo( 'name' );
  17. } elseif ( is_home() || is_front_page()) {
  18. bloginfo( 'name' ); echo ' | '; bloginfo( 'description' );
  19. } elseif ( is_404() ) {
  20. echo theme_locals("error_404")." | "; bloginfo( 'name' );
  21. } elseif ( is_single() ) {
  22. wp_title('');
  23. } else {
  24. wp_title( ' | ', true, 'right' ); bloginfo( 'name' );
  25. } ?></title>
  26. <meta name="description" content="<?php wp_title(); echo ' | '; bloginfo( 'description' ); ?>" />
  27. <meta charset="<?php bloginfo( 'charset' ); ?>" />
  28. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  29. <link rel="profile" href="http://gmpg.org/xfn/11" />
  30. <?php if(of_get_option('favicon') != ''){ ?>
  31. <link rel="icon" href="<?php echo of_get_option('favicon', "" ); ?>" type="image/x-icon" />
  32. <?php } else { ?>
  33. <link rel="icon" href="<?php echo get_stylesheet_directory_uri(); ?>/favicon.ico" type="image/x-icon" />
  34. <?php } ?>
  35. <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
  36. <link rel="alternate" type="application/rss+xml" title="<?php bloginfo( 'name' ); ?>" href="<?php bloginfo( 'rss2_url' ); ?>" />
  37. <link rel="alternate" type="application/atom+xml" title="<?php bloginfo( 'name' ); ?>" href="<?php bloginfo( 'atom_url' ); ?>" />
  38. <link rel="stylesheet" type="text/css" media="all" href="<?php echo get_stylesheet_directory_uri(); ?>/bootstrap/css/bootstrap.css" />
  39. <link rel="stylesheet" type="text/css" media="all" href="<?php echo get_stylesheet_directory_uri(); ?>/bootstrap/css/responsive.css" />
  40. <link rel="stylesheet" type="text/css" media="all" href="<?php echo get_template_directory_uri(); ?>/css/camera.css" />
  41. <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
  42. <style type="text/css">
  43. <?php echo of_get_option('custom_css'); ?>
  44. <?php $background = of_get_option('body_background');
  45. if ($background != '') {
  46. if ($background['image'] != '') {
  47. echo 'body { background-image:url('.$background['image']. '); background-repeat:'.$background['repeat'].'; background-position:'.$background['position'].'; background-attachment:'.$background['attachment'].'; }';
  48. }
  49. if($background['color'] != '') {
  50. echo 'body { background-color:'.$background['color']. '}';
  51. }
  52. };
  53. ?>
  54. <?php $header_styling = of_get_option('header_color');
  55. if($header_styling != '') {
  56. echo '.header {background-color:'.$header_styling.'}';
  57. }
  58. ?>
  59. </style>
  60. <?php
  61. /* Always have wp_head() just before the closing </head>
  62. * tag of your theme, or you will break many plugins, which
  63. * generally use this hook to add elements to <head> such
  64. * as styles, scripts, and meta tags.
  65. */
  66. wp_head();
  67. ?>
  68. <?php
  69. /* The HTML5 Shim is required for older browsers, mainly older versions IE */ ?>
  70. <!--[if lt IE 8]>
  71. <div style=' clear: both; text-align:center; position: relative;'>
  72. <a href="http://www.microsoft.com/windows/internet-explorer/default.aspx?ocid=ie6_countdown_bannercode"><img src="http://storage.ie6countdown.com/assets/100/images/banners/warning_bar_0000_us.jpg" border="0" alt="" /></a>
  73. </div>
  74. <![endif]-->
  75. <!--[if (gt IE 9)|!(IE)]><!-->
  76. <script src="<?php echo get_template_directory_uri(); ?>/js/jquery.mobile.customized.min.js" type="text/javascript"></script>
  77. <script type="text/javascript">
  78. jQuery(function(){
  79. jQuery('.sf-menu').mobileMenu({defaultText: <?php echo '"'.of_get_option('mobile_menu_label').'"'; ?>});
  80. });
  81. </script>
  82. <!--<![endif]-->
  83. <script type="text/javascript">
  84. // Init navigation menu
  85. jQuery(function(){
  86. // main navigation init
  87. jQuery('ul.sf-menu').superfish({
  88. delay: <?php echo of_get_option('sf_delay'); ?>, // the delay in milliseconds that the mouse can remain outside a sub-menu without it closing
  89. animation: {opacity:'<?php echo of_get_option('sf_f_animation'); ?>'<?php if (of_get_option('sf_sl_animation')=='show') { ?>,height:'<?php echo of_get_option('sf_sl_animation'); ?>'<?php } ?>}, // used to animate the sub-menu open
  90. speed: '<?php echo of_get_option('sf_speed'); ?>', // animation speed
  91. autoArrows: <?php echo (of_get_option('sf_arrows')==false) ? 'false' : of_get_option('sf_arrows'); ?>, // generation of arrow mark-up (for submenu)
  92. disableHI: true // to disable hoverIntent detection
  93. });
  94. //Zoom fix
  95. //IPad/IPhone
  96. var viewportmeta = document.querySelector && document.querySelector('meta[name="viewport"]'),
  97. ua = navigator.userAgent,
  98. gestureStart = function () {
  99. viewportmeta.content = "width=device-width, minimum-scale=0.25, maximum-scale=1.6";
  100. },
  101. scaleFix = function () {
  102. if (viewportmeta && /iPhone|iPad/.test(ua) && !/Opera Mini/.test(ua)) {
  103. viewportmeta.content = "width=device-width, minimum-scale=1.0, maximum-scale=1.0";
  104. document.addEventListener("gesturestart", gestureStart, false);
  105. }
  106. };
  107. scaleFix();
  108. })
  109. </script>
  110. </head>
  111. <body <?php body_class(); ?>>
  112. <div id="motopress-main" class="main-holder">
  113. <!--Begin #motopress-main-->
  114. <header class="motopress-wrapper header">
  115. <div class="bg-header">
  116. <div class="container">
  117. <div class="row">
  118. <div class="span12" data-motopress-wrapper-file="wrapper/wrapper-header.php" data-motopress-wrapper-type="header" data-motopress-id="<?php echo uniqid() ?>">
  119. <?php get_template_part('wrapper/wrapper-header'); ?>
  120. </div>
  121. </div>
  122. </div>
  123. </div>
  124. </header>

childtheme header.php