Advertisement
rizky07

sw

Sep 17th, 2022 (edited)
4,493
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.31 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html <?php language_attributes(); ?>>
  3. <head>
  4. <meta charset="<?php bloginfo('charset'); ?>">
  5. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  6. <link rel="preconnect" href="https://fonts.googleapis.com">
  7. <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  8. <link href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,600;1,600&display=swap" rel="stylesheet">
  9. <?php wp_head(); ?>
  10.  
  11.  
  12. <!-- Global site tag (gtag.js) - Google Analytics -->
  13. <script async src="https://www.googletagmanager.com/gtag/js?id=G-HZWHTZGWPB"></script>
  14. <script>
  15. window.dataLayer = window.dataLayer || [];
  16. function gtag(){dataLayer.push(arguments);}
  17. gtag('js', new Date());
  18.  
  19. gtag('config', 'G-HZWHTZGWPB');
  20. </script>
  21. <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1846535141887168"
  22. crossorigin="anonymous"></script>
  23.  
  24.  
  25. </head>
  26.  
  27. <?php
  28. $navbar_scheme = get_theme_mod('navbar_scheme', 'navbar-light bg-light'); // Get custom meta-value.
  29. $navbar_position = get_theme_mod('navbar_position', 'static'); // Get custom meta-value.
  30.  
  31. $search_enabled = get_theme_mod('search_enabled', '1'); // Get custom meta-value.
  32. ?>
  33.  
  34. <body <?php body_class(); ?>>
  35.  
  36.  
  37. <script async src='https://tag.simpli.fi/sifitag/963d9b90-d0b3-013a-5245-0cc47a8ffaac'></script>
  38.  
  39. <?php wp_body_open(); ?>
  40.  
  41. <a href="#main" class="visually-hidden-focusable"><?php esc_html_e('Skip to main content', 'tehran'); ?></a>
  42.  
  43. <div id="wrapper">
  44. <header>
  45. <nav id="header" class="navbar navbar-expand-md <?php echo esc_attr($navbar_scheme);
  46. if (isset($navbar_position) && 'fixed_top' === $navbar_position) : echo ' fixed-top';
  47. elseif (isset($navbar_position) && 'fixed_bottom' === $navbar_position) : echo ' fixed-bottom';
  48. endif;
  49. if (is_home() || is_front_page()) : echo ' home';
  50. endif; ?>">
  51. <div class="container">
  52. <a class="navbar-brand" href="<?php echo esc_url(home_url()); ?>" title="<?php echo esc_attr(get_bloginfo('name', 'display')); ?>" rel="home">
  53. <?php
  54. $header_logo = get_theme_mod('header_logo'); // Get custom meta-value.
  55.  
  56. if (!empty($header_logo)) :
  57. ?>
  58. <img src="<?php echo esc_url($header_logo); ?>" alt="<?php echo esc_attr(get_bloginfo('name', 'display')); ?>" />
  59. <?php
  60. else :
  61. echo esc_attr(get_bloginfo('name', 'display'));
  62. endif;
  63. ?>
  64. </a>
  65.  
  66. <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="<?php esc_attr_e('Toggle navigation', 'tehran'); ?>">
  67. <span class="navbar-toggler-icon"></span>
  68. </button>
  69.  
  70. <div id="navbar" class="collapse navbar-collapse">
  71. <?php
  72. // Loading WordPress Custom Menu (theme_location).
  73. wp_nav_menu(
  74. array(
  75. 'theme_location' => 'main-menu',
  76. 'container' => '',
  77. 'menu_class' => 'navbar-nav me-auto',
  78. 'fallback_cb' => 'WP_Bootstrap_Navwalker::fallback',
  79. 'walker' => new WP_Bootstrap_Navwalker(),
  80. )
  81. );
  82.  
  83. if ('1' === $search_enabled) :
  84. ?>
  85. <form class="search-form my-2 my-lg-0" role="search" method="get" action="<?php echo esc_url(home_url('/')); ?>">
  86. <div class="input-group">
  87. <input type="text" name="s" class="form-control" placeholder="<?php esc_attr_e('Search', 'tehran'); ?>" title="<?php esc_attr_e('Search', 'tehran'); ?>" />
  88. <button type="submit" name="submit" class="btn btn-outline-secondary"><?php esc_html_e('Search', 'tehran'); ?></button>
  89. </div>
  90. </form>
  91. <?php
  92. endif;
  93. ?>
  94. </div><!-- /.navbar-collapse -->
  95. </div><!-- /.container -->
  96. </nav><!-- /#header -->
  97. </header>
  98.  
  99. <main id="main" class="container"<?php if (isset($navbar_position) && 'fixed_top' === $navbar_position) : echo ' style="padding-top: 100px;"';
  100. elseif (isset($navbar_position) && 'fixed_bottom' === $navbar_position) : echo ' style="padding-bottom: 100px;"';
  101. endif; ?>>
  102. <?php
  103. // If Single or Archive (Category, Tag, Author or a Date based page).
  104. if (is_single() || is_archive()) :
  105. ?>
  106. <div class="row">
  107. <div class="col-md-8 col-sm-12">
  108. <?php
  109. endif;
  110. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement