← Back
Editing: footer.php
<?php /** * The template for displaying the footer * * Contains the closing of the #content div and all content after. * * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials * * @package WP_Bootstrap_Starter */ ?> <?php if(!is_page_template( 'blank-page.php' ) && !is_page_template( 'blank-page-with-container.php' )): ?> <?php get_template_part( 'footer-widget' ); $logotip = mb_stripos($_SERVER['REQUEST_URI'], '/asda') !==false ? get_header_field('logo-asda')['url'] : get_header_field('logo-barvent')['url']; if (mb_stripos($_SERVER['REQUEST_URI'], '/kontakty') !== false || mb_stripos($_SERVER['REQUEST_URI'], '/en/contacts') !== false) { require_once 'footer_contact.php'; } else { ?> <!-- FOOTER PART--> <div class="footer-part"> <div class="container"> <div class="row"> <div id="socials-desk" class="col-lg-12 mt-5 mb-5"> <div class="socials"> <a href="<?= get_field('facebook-url', 49) ?>"><img alt="" src="<?=get_template_directory_uri()?>/inc/assets/images/facebook-logo@2x.png"></a> <a href="<?= get_field('instagram-url', 49) ?>"><img alt="" src="<?=get_template_directory_uri()?>/inc/assets/images/instagram-logo1@2x.png"></a> <a href="<?= get_field('linkedin-url', 49) ?>"><img alt="" src="<?=get_template_directory_uri()?>/inc/assets/images/linkedin-logo1@2x.png"></a> <a href="<?= get_field('whatsapp-url', 49) ?>"><img alt="" src="<?=get_template_directory_uri()?>/inc/assets/images/whatsapp-icon@2x.png"></a> <a href="<?= get_field('telegram-url', 49) ?>"><i style="font-size: 37px; color: white; margin: 0 10px;" class="fab fa-telegram"></i></a> </div> </div> <?php include 'footer_infos.php'; ?> <div id="gl-office" class="col-lg-4 col-sm-6 "> <h2 class="mb-lg-4"><?=L::main_office?></h2> <br><br> <div id="loc"><img alt="" src="<?=get_template_directory_uri()?>/inc/assets/images/location-icon@2x.png"></div> <div class="office"> <?= $address ?></div> </div> <div class="col-lg-4 col-sm-6 footer-center mb-lg-5"> <div class="footer-map"> <?= $location ?> </div> </div> <?php // epoksidniy-pol (ru/en) has no phone ACF fields of its own — numbers fixed per business request $epoxy_floor_pages = [4219, 4224]; // Pages whose own phone-1/phone-2 fields should drive the footer regardless of $category_id // (category-listing pages themselves have no category term — only their product posts do) $phone_source_pages = [ 345 => 345, // barvent-produktsiya (ru) — top product listing page 347 => 347, // barvent-products (en) 80 => 80, // himicheskaya-produktsiya (ru) — category page itself 109 => 80, // chemical-products (en) — mirrors ru page 80, same as $footeri[50] ]; if (in_array(get_the_ID(), $epoxy_floor_pages)) { $phones = get_footer_phone_html('+998 70 484-91-22', 'mb-3') . get_footer_phone_html('+998 93 388-92-22', 'mb-3') . get_footer_phone_html('+998 94 940-92-22'); } else if (isset($phone_source_pages[get_the_ID()])) { $phones = get_footer_phones_html($phone_source_pages[get_the_ID()], ['mb-3', '']); } else if (isset($footeri[$category_id]) && get_field('phone-1', $footeri[$category_id])) { $phones = get_footer_phones_html($footeri[$category_id], ['mb-3', '', 'mt-3 mb-3', '']); } else if (in_array($category_id, [15, 17])) { $phones = get_footer_phones_html(163, ['mb-3', 'mb-3', 'mb-3', '']); } else { $phones = get_footer_phone_html(get_field('barvent-phone-1', 49), 'mb-3') . get_footer_phone_html(get_field('barvent-phone-2', 49)); } ?> <div id="contact" class="col-lg-4"> <h2 class="mb-lg-5"><?=L::contacts ?></h2> <?= $phones ?> <h2 id="email" class="mb-lg-5">Email</h2> <div class="contact-email mb-4"> <img alt="" src="<?=get_template_directory_uri()?>/inc/assets/images/mail-2@2x.png"><span><?= $email?></span> </div> </div> <!-- Mobile socials--> <div id="socials-mob" class="col-sm-6"> <a href="<?= get_field('facebook-url', 49) ?>"><img alt="" src="<?=get_template_directory_uri()?>/inc/assets/images/facebook-logo@2x.png"></a> <a href="<?= get_field('instagram-url', 49) ?>"><img alt="" src="<?=get_template_directory_uri()?>/inc/assets/images/instagram-logo1@2x.png"></a> <a href="<?= get_field('linkedin-url', 49) ?>"><img alt="" src="<?=get_template_directory_uri()?>/inc/assets/images/linkedin-logo1@2x.png"></a> <a href="<?= get_field('whatsapp-url', 49) ?>"><img alt="" src="<?=get_template_directory_uri()?>/inc/assets/images/whatsapp-icon@2x.png"></a> <a href="<?= get_field('telegram-url', 49) ?>"><i style="color: white; font-size: 25px;" class="fab fa-telegram"></i></a> </div> </div></div> </div> <div class="copyright"> <div class="container"> <div class="row"> <div class="col-lg-8 col-lg-offset-1"> Copyright © <?= date('Y') ?> Barvent Impex | <?= L::all_rights_reserved?> </div> <div class="col-lg-4 col-lg-offset-2"><?= L::website_dev ?> - <a href="https://oqila.uz"><img src="<?=get_template_directory_uri()?>/inc/assets/images/oqila_logo.png" /></a> </div> </div> </div> </div> <!--END FOOTER PART--> <?php } endif; ?> <!-- Mobile navbar menu--> <div id="page-mobile-main-menu" class="page-mobile-main-menu"> <div class="page-mobile-menu-header"> <div class="page-mobile-menu-logo"> <a href="<?= $GLOBALS['TIL'] == 'ru' ? '/' : '/'.$GLOBALS['TIL'] ?>" rel="home"> <img src="<?= $logotip ?>" alt="Barvent.uz"/> </a> </div> <div id="page-close-mobile-menu" class="page-close-mobile-menu"> <i class="fa-solid fa-xmark"></i> </div> </div> <div class="page-mobile-menu-content"> <ul id="mobile-menu-primary" class="menu__container"> <?php $menus = wp_get_nav_menu_items('menu_'.$GLOBALS['TIL']); foreach ($menus as $menu) { ?> <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-4808 level-1"><a href="<?= $menu->url ?>"><div class="menu-item-wrap"><span class="menu-item-title"><?= $menu->title ?></span></div></a></li> <?php } ?> <li class="menu-item" style=" border-top: 1px solid #333; padding-top: 18px;"> <div id="m-lang" style="display: inline-flex;/en/"><style>#m-lang a { padding-right: 30px; }</style> <a href="/"><img width="25" src="<?=get_template_directory_uri()?>/inc/assets/images/ru-flag.png" alt="ru" title="Русский"></a> <a href="/en"><img width="25" src="<?=get_template_directory_uri()?>/inc/assets/images/en-flag.png" alt="en" title="English"></a> </div> </li> </ul> </div> </div> <!-- End mobile navbar--> <!--<script src="--><?php //bloginfo('template_url'); ?><!--/inc/assets/js/jquery.min.js"></script>--> <script src='<?=get_template_directory_uri()?>/inc/assets/js/jquery.min.js'></script> <script src="<?php bloginfo('template_url'); ?>/inc/assets/owl-carousel/dist/owl.carousel.js"></script> <script> var owl = $('#owl-carousel'); owl.owlCarousel({ margin: 10, dots: true, loop: true, autoplay:true, responsive: { 0: { items: 1 }, 600: { items: 2 }, 1000: { items: 4 } } }) </script> <?php $lang = $GLOBALS['TIL']; get_template_part('email-order-modal'); ?> <button class="sticky-call-btn" data-bs-toggle="modal" data-bs-target="#callbackModal" aria-label="<?= esc_attr(L('consultation')) ?>"> <i class="fa-solid fa-phone"></i> </button> <style> /* Inquiry modal */ .inquiry-modal { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 8px 40px rgba(0,0,0,.18); pointer-events: auto; } .inquiry-modal__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 24px 24px 16px; border-bottom: 1px solid #eee; } .inquiry-modal__title { margin: 0 0 4px; font-size: 20px; font-weight: 600; color: #1a1a1a; line-height: 1.3; } .inquiry-modal__subtitle { margin: 0; font-size: 14px; color: #666; line-height: 1.4; } .inquiry-modal__close-btn { flex-shrink: 0; background: none; border: none; cursor: pointer; padding: 2px; font-size: 24px; line-height: 1; color: #999; } .inquiry-modal__close-btn:hover { color: #333; } .inquiry-modal__body { padding: 20px 24px 24px; } .inquiry-modal__field { margin-bottom: 14px; } .inquiry-modal__label { display: block; margin-bottom: 5px; font-size: 15px; font-weight: 600; color: #000; } .inquiry-modal__label span { color: #f39500; } .inquiry-modal__input, .inquiry-modal__textarea { width: 100%; padding: 9px 12px; border: 1px solid #d0d0d0; border-radius: 6px; font-size: 14px; color: #1a1a1a; background: #fafafa; transition: border-color .15s; box-sizing: border-box; } .inquiry-modal__input:focus, .inquiry-modal__textarea:focus { outline: none; border-color: #f39500; background: #fff; } .inquiry-modal__textarea { resize: vertical; } .inquiry-modal__submit-btn { width: 100%; background: #f39500; color: #fff; border: none; border-radius: 6px; font-size: 15px; font-weight: 600; cursor: pointer; margin-top: 4px; transition: background .2s; } .inquiry-modal__submit-btn:hover { background: #d98200; } /* Sticky phone button */ .sticky-call-btn { position: fixed; bottom: 32px; right: 32px; z-index: 1050; width: 75px; height: 77px; border-radius: 50%; border: none; background: #f39500; color: #fff; font-size: 22px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .2s, transform .2s; animation: sticky-call-pulse 2s ease-out infinite; } .sticky-call-btn:hover { background: #d98200; transform: scale(1.08); animation: none; box-shadow: 0 6px 20px rgba(243,149,0,.6); } @keyframes sticky-call-pulse { 0% { box-shadow: 0 0 0 0 rgba(243,149,0,.7); } 70% { box-shadow: 0 0 0 16px rgba(243,149,0,0); } 100% { box-shadow: 0 0 0 0 rgba(243,149,0,0); } } .sticky-call-btn i { animation: sticky-call-ring 3s ease-in-out infinite; transform-origin: top center; } @keyframes sticky-call-ring { 0%, 60%, 100% { transform: rotate(0deg); } 65% { transform: rotate(15deg); } 70% { transform: rotate(-12deg); } 75% { transform: rotate(10deg); } 80% { transform: rotate(-8deg); } 85% { transform: rotate(5deg); } } </style> <?php wp_footer(); ?> <script type='text/javascript'> var HoverOnTouch = new HoverOnTouch(); /* <![CDATA[ */ var $insight = {"templateUrl":"<?=get_template_directory_uri()?>","ajaxurl":"<?= site_url()?>/wp-admin\/admin-ajax.php","primary_color":"#f39500","header_sticky_enable":"1","header_sticky_height":"70","scroll_top_enable":"1","lazyLoadImages":"1","light_gallery_auto_play":"0","light_gallery_download":"1","light_gallery_full_screen":"1","light_gallery_zoom":"1","light_gallery_thumbnail":"1","light_gallery_share":"1","mobile_menu_breakpoint":"1199","isSingleProduct":"","noticeCookieEnable":"","noticeCookieConfirm":"no","noticeCookieMessages":"We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.<a id=\"tm-button-cookie-notice-ok\" class=\"tm-button tm-button-xs tm-button-full-wide tm-button-primary style-outline\">OK, GOT IT<\/a>","noticeCookieOKMessages":"Thank you! Hope you have the best experience on our website.","like":"Like","unlike":"Unlike"}; /* ]]> */ </script> <script> window.lazyLoadOptions = { elements_selector: "[loading=lazy],.rocket-lazyload", data_src: "lazy-src", data_srcset: "lazy-srcset", data_sizes: "lazy-sizes", class_loading: "lazyloading", class_loaded: "lazyloaded", threshold: 300, callback_loaded: function(element) { if ( element.tagName === "IFRAME" && element.dataset.rocketLazyload == "fitvidscompatible" ) { if (element.classList.contains("lazyloaded") ) { if (typeof window.jQuery != "undefined") { if (jQuery.fn.fitVids) { jQuery(element).parent().fitVids(); } } } } }, use_native: true}; window.addEventListener('LazyLoad::Initialized', function (e) { var lazyLoadInstance = e.detail.instance; if (window.MutationObserver) { var observer = new MutationObserver(function(mutations) { var image_count = 0; var iframe_count = 0; var rocketlazy_count = 0; mutations.forEach(function(mutation) { for (i = 0; i < mutation.addedNodes.length; i++) { if (typeof mutation.addedNodes[i].getElementsByTagName !== 'function') { return; } if (typeof mutation.addedNodes[i].getElementsByClassName !== 'function') { return; } images = mutation.addedNodes[i].getElementsByTagName('img'); is_image = mutation.addedNodes[i].tagName == "IMG"; iframes = mutation.addedNodes[i].getElementsByTagName('iframe'); is_iframe = mutation.addedNodes[i].tagName == "IFRAME"; rocket_lazy = mutation.addedNodes[i].getElementsByClassName('rocket-lazyload'); image_count += images.length; iframe_count += iframes.length; rocketlazy_count += rocket_lazy.length; if(is_image){ image_count += 1; } if(is_iframe){ iframe_count += 1; } } } ); if(image_count > 0 || iframe_count > 0 || rocketlazy_count > 0){ lazyLoadInstance.update(); } } ); var b = document.getElementsByTagName("body")[0]; var config = { childList: true, subtree: true }; observer.observe(b, config); } }, false);</script> </body> </html>
Save File
Cancel