← Back
Editing: header.php
<?php /** * The header for our theme * * This is the template that displays all of the <head> section and everything up until <div id="content"> * * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials * * @package WP_Bootstrap_Starter */ ?><!DOCTYPE html> <html <?php language_attributes(); ?>> <head> <meta charset="<?php bloginfo( 'charset' ); ?>"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <link rel="profile" href="http://gmpg.org/xfn/11"> <link rel="stylesheet" href="https://use.fontawesome.com/releases/v6.2.0/css/all.css"/> <link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/inc/assets/owl-carousel/dist/assets/owl.carousel.css" type="text/css" media="screen" /> <link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/inc/assets/owl-carousel/dist/assets/owl.theme.default.css" type="text/css" media="screen" /> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css" integrity="sha512-KfkfwYDsLkIlwQp6LFnl8zNdLGxu9YAA1QvwINks4PhcElQSvqcyVLLD9aMhXd13uQjoXtEKNosOWaZqXgel0g==" crossorigin="anonymous" referrerpolicy="no-referrer" /> <link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/inc/assets/css/produkt_style.css?v=<?=time()?>" type="text/css" media="screen" /> <?php wp_head(); ?> <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap"/> <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap"/> <!-- Fancybox CSS --> <link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.css'> <!-- Swiper CSS --> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css" /> <!-- Google tag (gtag.js) --> <script async src="https://www.googletagmanager.com/gtag/js?id=G-Q779W78YK1"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-Q779W78YK1'); </script> <style type="text/css"> ul { list-style: none; padding-inline-start: 0 !important; } ul li:first-child { margin-top: 35px; } h2.heading { line-height: 30px; font-weight: 500; font-size: 35px; color: #222; } h3.heading { line-height: 20px; font-weight: 400; font-size: 16px; color: #222; } h4.heading { line-height: 30px; font-weight: 500; font-size: 27px; color: #222; } h6.title { font-size: 16px; font-weight: 600; line-height: 1.66; color: #777777; margin: 10px 0; } p.heading { line-height: 20px; font-weight: 400; font-size: 16px; color: #777777; } .text-center { text-align: center; } .text-orange { color: #ffa500 !important;; } h6.title i { color: #ffa500; margin-right: 10px; } .main_section h2 { line-height: 20px; font-weight: 400; font-size: 16px; } .desc_section_block { margin-top: 35px; padding: 35px 15px; border: 1px solid #cecece; border-left: 5px solid orange; background-color: #f4f4f4; } .desc_section_block h2 { margin-bottom: 24px; } .section-title { margin-top: 75px; margin-bottom: 35px; } .features_section_img_wrapper { text-align: center; margin: 25px auto 0; } .features_section_img_wrapper img { box-shadow: 0 10px 20px orange; } .offer_block { margin: 75px 0; padding: 35px 15px; border: 1px solid #cecece; background-color: #f4f4f4; } .offer_block h2 { margin-bottom: 25px; } .properties_section_block { margin-top: 35px; padding: 35px 15px; border: 1px solid #cecece; border-left: 5px solid orange; background-color: #f4f4f4; } </style> </head> <body class="page-template-default page page-id-860 isChrome group-blog desktop desktop-menu post-type-page page-has-animation header-sticky-both wide page-has-no-sidebar wpb-js-composer js-comp-ver-5.6 vc_responsive"> <?php // WordPress 5.2 wp_body_open implementation if ( function_exists( 'wp_body_open' ) ) { wp_body_open(); } else { do_action( 'wp_body_open' ); } ?> <?php $logotip = mb_stripos($_SERVER['REQUEST_URI'], '/asda') !==false ? get_header_field('logo-asda')['url'] : get_header_field('logo-barvent')['url']; // get kategory id current single post $categories = get_the_category(); $category_id = !empty($categories) ? $categories[0]->cat_ID : 0; // get parent page id current page $parentID = wp_get_post_parent_id(get_the_ID()); ?> <!-- SECTION HEADER--> <div class="container"> <div id="page" class="site"> <div class="content-wrapper"> <header id="page-header" class="page-header header-19 dark-logo-version"> <div id="page-header-inner" class="page-header-inner" data-sticky="1"> <div class="container"> <div class="row"> <div class=""> <div class="header-wrap"> <div class="branding"> <div class="branding__logo"> <a href="<?= $GLOBALS['TIL'] == 'ru' ? '/' : '/'.$GLOBALS['TIL'] ?>" rel="home"> <img loading="lazy" alt="Barvent.uz" src="<?=$logotip ?>" class="main-logo" data-lazy-src="<?=get_template_directory_uri()?>/inc/assets/images/newprxim.png"> </a> </div> </div> <?php if (get_field('phone-head')) { $phone_nums = '<a href="tel:'.get_field('phone-head').'">'.get_field('phone-head') .'</a>'; } else { if (in_array($category_id, [15, 17]) || $_SERVER['REQUEST_URI'] == '/asda' || mb_stripos($_SERVER['REQUEST_URI'], '/barvent/informatsiya') !== false || mb_stripos($_SERVER['REQUEST_URI'], '/en/barvent/information') !== false || in_array($parentID, [349, 351])) { $phone_nums = '<a href="tel:'.get_field('asda-phone-1', 49).'">'.get_field('asda-phone-1', 49) .'</a>'; } else { $phone_nums = '<a href="tel:+998 78 147-89-99">+998 78 147-89-99</a>'; } } ?> <div class="header-left-info"> <div class="info-wrap"><div class="info-content"> <div style="display: inline-flex; align-items: center;"> <img class="phone-1" alt="" src="<?=get_template_directory_uri()?>/inc/assets/images/phone-1@2x.png" /> <?= $phone_nums ?> </div> </div> </div> </div> <div id="page-navigation" class="navigation page-navigation"> <nav id="menu" class="menu menu--primary"> <ul id="menu-primary-menu" class="menu__container sm sm-simple"> <?php $menus = wp_get_nav_menu_items('menu_'.$GLOBALS['TIL']); foreach ($menus as $menu) { ?> <li><a href="<?= $menu->url ?>"><?= $menu->title ?></a></li> <?php } ?> </ul> </nav> </div> <div class="langs"> <a class="mr-3" href="/"><img alt="" src="<?=get_template_directory_uri()?>/inc/assets/images/russia-1@2x.png"/></a> <a href="/en"><img alt="" src="<?=get_template_directory_uri()?>/inc/assets/images/usa-1@2x.png" /></a> </div> <div class="header-right"> <div class="header-right-wrap"> <div class="header-right-below"> <div id="page-open-mobile-menu" class="page-open-mobile-menu"> <div class="inner"> <div class="icon"><i style="color:#F39200;"></i></div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </header> <br> </div><!-- /.content-wrapper --> </div> </div>
Save File
Cancel