HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: /var/www/html/israel-rentals/wp-content/themes/israel-rentals/header.php
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
    <meta charset="<?php bloginfo('charset'); ?>" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Israel Rentals</title>
    <link rel="icon" type="image/x-icon" href="<?php echo get_template_directory_uri(); ?>/img/favicon.ico" />
    <?php wp_head(); ?>
    <script type="text/javascript">
        var ajaxurl = "<?php echo admin_url('admin-ajax.php'); ?>";
    </script>
</head>
<body <?php body_class(); ?>>
<header class="header">
    <div class="header-top-sec">
        <div class="header-top-container">
            <div class="img-block">
                <a href="#">
                    <img src="<?php echo get_template_directory_uri(); ?>/img/hdr-img-1.svg" alt="">
                </a>
            </div>
            <div class="img-block">
                <a href="#">
                    <img src="<?php echo get_template_directory_uri(); ?>/img/hdr-img-2.svg" alt="">
                </a>
            </div>
            <div class="img-block">
                <a href="<?php echo home_url(); ?>">
                    <img src="<?php echo get_template_directory_uri(); ?>/img/hdr-img-3.svg" alt="">
                </a>
            </div>
        </div>
    </div>
    <nav class="navbar navbar-expand-lg" id="main-header">
        <div class="container custom-container">
            <a class="navbar-brand" href="<?php echo home_url(); ?>">
                <img src="<?php echo get_template_directory_uri(); ?>/img/logo.svg" alt="Logo" />
            </a>

            <button
                class="navbar-toggler"
                type="button"
                data-bs-toggle="collapse"
                data-bs-target="#navbarNav"
                aria-controls="navbarNav"
                aria-expanded="false"
                aria-label="Toggle navigation"
            >
                <span class="navbar-toggler-ico"></span>
                <span class="navbar-toggler-ico"></span>
                <span class="navbar-toggler-ico"></span>
            </button>

            <div class="collapse navbar-collapse justify-content-end" id="navbarNav">
            <ul class="navbar-nav">
              <li class="nav-item">
                <a class="nav-link <?php echo (is_page('home')) ? 'active' : ''; ?>" aria-current="page" href="<?php echo home_url(); ?>">Home</a>
              </li>
              <!-- <li class="nav-item">
                <a class="nav-link" href="#">About</a>
              </li> -->
              <li class="nav-item">
                <a class="nav-link <?php echo (is_page('listing-page')) ? 'active' : ''; ?>" href="<?=site_url('listing-page')?>">Rentals</a>
              </li>
              <!-- <li class="nav-item">
                <a class="nav-link js-anchor-link" href="<?php echo site_url(); ?>/#contact">Contact Us</a>
              </li> -->
              
				 <li class="nav-item">
                   <a class="nav-link <?php echo (is_page('home')) ? 'active' : ''; ?>" aria-current="page" href="<?php echo home_url(); ?>#contact">Contact Us</a>
              </li>
            </ul>
                <div class="btn-blk">
                    <a href="https://wa.me/?" target="_blank" class="btn btn-secondary">
                        <span class="icon"><img src="<?php echo get_template_directory_uri(); ?>/img/whatsapp-icon.svg" alt="WhatsApp Icon" /></span>
                        Join us on WhatsApp
                    </a>
                    <a href="#" class="btn btn-primary"  data-bs-toggle="modal" data-bs-target="#addPropertyModal">Add your property</a>
                </div>
            </div>
        </div>
    </nav>
</header>
	
	<script>
	document.addEventListener('DOMContentLoaded', function() {
    const anchorLinks = document.querySelectorAll('.js-anchor-link');

    anchorLinks.forEach(link => {
        link.addEventListener('click', function(e) {
            e.preventDefault();

            const targetID = this.getAttribute('href').split('#')[1];
            const targetElement = document.getElementById(targetID);

            if (targetElement) {
                window.scrollTo({
                    top: targetElement.offsetTop,
                    behavior: 'smooth'
                });
            }
        });
    });
});

	</script>