header.php 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <?php
  2. /**
  3. * The template for displaying the header
  4. *
  5. * Displays all of the head element and everything up until the "site-content" div.
  6. *
  7. * @package WordPress
  8. * @subpackage Taskereasy
  9. * @since Taskereasy 1.0.0
  10. */
  11. ?>
  12. <!DOCTYPE HTML>
  13. <html <?php language_attributes(); ?>>
  14. <head>
  15. <meta charset="<?php bloginfo( 'charset' ); ?>">
  16. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  17. <link href="https://unpkg.com/ionicons@4.5.10-0/dist/css/ionicons.min.css" rel="stylesheet">
  18. <?php
  19. taskereasy_favicon();
  20. wp_head();
  21. ?>
  22. </head>
  23. <body <?php body_class(); ?>>
  24. <!-- Header -->
  25. <?php
  26. $header_style = (taskereasy_get_config('header_style') == 'header_style_2') ? 'nav-stacked transparent' : '';
  27. $header_top_transparent = (taskereasy_get_config('header_style') == 'header_style_2') ? 'transparent' : 'top-header';
  28. $header_bottom_transparent = (taskereasy_get_config('header_style') == 'header_style_2') ? 'transparent' : 'bottom-header';
  29. $top_header = (taskereasy_get_config('topHeader-enable') == '1') ? '' : 'hide_top_header';
  30. $phn_info = (taskereasy_get_config('header-top-phone') != '') ? taskereasy_get_config('header-top-phone') : '';
  31. ?>
  32. <header id="header" class="<?php echo esc_attr($header_style); ?>">
  33. <div class="header-top primary-bg <?php echo esc_attr($top_header) . ' ' . esc_attr($header_top_transparent); ?>" >
  34. <div class="container">
  35. <div class="row">
  36. <div class="col-6">
  37. <?php if(taskereasy_get_config('header-top-social') == '1'){ ?>
  38. <div class="follow-us">
  39. <ul>
  40. <?php if(taskereasy_get_config('facebook')) { ?>
  41. <li><a href="<?php echo esc_url(taskereasy_get_config('facebook')); ?>"><i class="fa fa-facebook"></i></a></li>
  42. <?php }
  43. if(taskereasy_get_config('twitter')) { ?>
  44. <li><a href="<?php echo esc_url(taskereasy_get_config('twitter')); ?>"><i class="fa fa-twitter"></i></a></li>
  45. <?php }
  46. if(taskereasy_get_config('linkedin')) { ?>
  47. <li><a href="<?php echo esc_url(taskereasy_get_config('linkedin')); ?>"><i class="fa fa-linkedin"></i></a></li>
  48. <?php }
  49. if(taskereasy_get_config('instagram')) { ?>
  50. <li><a href="<?php echo esc_url(taskereasy_get_config('instagram')); ?>"><i class="fa fa-instagram"></i></a></li>
  51. <?php }
  52. if(taskereasy_get_config('youtube')) { ?>
  53. <li><a href="<?php echo esc_url(taskereasy_get_config('youtube')); ?>"><i class="fa fa-youtube"></i></a></li>
  54. <?php }
  55. if(taskereasy_get_config('pinterest')) { ?>
  56. <li><a href="<?php echo esc_url(taskereasy_get_config('pinterest')); ?>"><i class="fa fa-pinterest"></i></a></li>
  57. <?php } ?>
  58. </ul>
  59. </div>
  60. <?php } ?>
  61. <div class="contact-info">
  62. <ul>
  63. <li><?php echo esc_html($phn_info); ?></li>
  64. </ul>
  65. </div>
  66. </div>
  67. <div class="col-6">
  68. <div class="text-right">
  69. <div class="header-links">
  70. <ul>
  71. <!--login-->
  72. <?php if(taskereasy_get_config('hide-user-login') == '1'){ ?>
  73. <li><a href="<?php echo esc_url(taskereasy_get_config('login-url')); ?>"><?php echo esc_html(taskereasy_get_config('login-text')); ?></a></li>
  74. <?php } ?>
  75. <!--support-->
  76. <?php if(taskereasy_get_config('hide-support') == '1'){ ?>
  77. <li><a href="<?php echo esc_url(taskereasy_get_config('support-url')); ?>"><?php echo esc_html(taskereasy_get_config('support-text')); ?></a></li>
  78. <?php } ?>
  79. </ul>
  80. </div>
  81. <?php
  82. if(taskereasy_get_config('header-top-search') == '1'){
  83. get_search_form();
  84. }
  85. ?>
  86. </div>
  87. </div>
  88. </div>
  89. </div>
  90. </div>
  91. <!-- Navigation -->
  92. <nav id="navigatio-_bar" class="navbar navbar-expand-lg navbar-default <?php echo esc_attr($header_bottom_transparent); ?>">
  93. <div class="container">
  94. <div class="ta-navbar-container">
  95. <div class="navbar-header clearfix">
  96. <div class="logo">
  97. <?php $logo = taskereasy_get_config('header-logo'); ?>
  98. <a href="<?php echo get_site_url(); ?>">
  99. <?php if(!empty($logo['url'])) { ?>
  100. <img src="<?php echo esc_url($logo['url']); ?>" alt="<?php echo bloginfo('name') ?>"/>
  101. <?php } else { ?>
  102. <h3><?php echo esc_html('Taskereasy'); ?></h3>
  103. <?php } ?>
  104. </a>
  105. </div>
  106. <!-- /Logo -->
  107. <button id="menu-slide" data-target="#navigation" aria-expanded="false" data-toggle="collapse" class="navbar-toggle collapsed" type="button">
  108. <span class="icon-bar"></span>
  109. <span class="icon-bar"></span>
  110. <span class="icon-bar"></span>
  111. </button>
  112. </div>
  113. <div class="ta-navbar-inner-container collapse navbar-collapse" id="navigation">
  114. <?php taskereasy_primary_menu(); ?>
  115. <?php if(taskereasy_get_config('hide-cta')){ ?>
  116. <a href="<?php echo !empty(taskereasy_get_config('cta-url')) ? esc_url(taskereasy_get_config('cta-url')) : esc_url(esc_html__('#', 'taskereasy')); ?>" class="btn header-nav-btn">
  117. <?php echo !empty(taskereasy_get_config('cta-text')) ? esc_html(taskereasy_get_config('cta-text')) : esc_html__('Enter Text', 'taskereasy'); ?>
  118. </a>
  119. <?php } ?>
  120. </div>
  121. </div>
  122. </div>
  123. </nav>
  124. <!-- Navigation end -->
  125. </header>
  126. <!-- /Header -->