File: /var/www/americahealthline.com/wp-content/themes/americahealthhaven/footer.php
<!-- Footer -->
<footer class="footer px-4 mt-5">
<div class="b-container">
<div class="row row-cols-1 pt-5 px-0">
<div class="footer-logo col-12 col-lg-3 mb-5 text-lg-start text-center">
<img src="<?php echo get_field('header_logo','option'); ?>" alt="">
<p class=""><?php echo get_field('footer_content','option'); ?></p>
</div>
<div class="col-12 col-sm-6 col-md-4 col-lg-3 mb-3">
<h4 class="text-white mb-4">Contact</h4>
<p class="text-white" style="font-weight: 600;"><?php echo get_field('address','option'); ?></p>
<p><a class="text-white fw-bold text-decoration-none" href=""><?php echo get_field('email','option'); ?></a></p>
<p><a class="text-white fw-bold text-decoration-none" href="">+<?php echo get_field('phone_text','option'); ?></a></p>
</div>
<div class="col-12 col-sm-6 col-md-4 col-lg-3 mb-3">
<h4 class="text-white mb-4">Quick Links</h4>
<?php wp_nav_menu(array(
"theme_location" => "footer",
"menu" => "Footer Nav 1",
"menu_class" => "d-flex flex-column p-0"
)) ?>
<a href="#" class="footer-advertise-link contact-popup-link">Advertise with Us</a>
</div>
<div class="col-12 col-md-4 col-lg-3 mb-3 text-md-start text-center">
<h4
class="font-1 fw-bolder text-white mb-4 justify-content-md-start justify-content-center align-items-center mt-md-0 mt-sm-4">
Newsletter</h4>
<p class="fw-bolder text-white">Subscribe to our Newsletter</p>
<div class="toast-container position-fixed bottom-0 end-0 p-3">
<div id="liveToast" class="toast success_msg_subscribe text-bg-light" role="alert" aria-live="assertive"
aria-atomic="true">
<div class="d-flex">
<button type="button" class="btn me-2 m-auto" data-bs-dismiss="toast" aria-label="Close">
<i class="bi bi-x-lg"></i>
</button>
</div>
</div>
</div>
<?php echo do_shortcode('[contact-form-7 id="91cab7a" title="Footer Form" html_class="d-flex mb-3 flex-column w-100 gap-2 needs-validation"]'); ?>
<!--<form class="d-flex mb-3 flex-column w-100 gap-2 needs-validation" novalidate>-->
<!-- <input type="email" name="text" class="form-control rounded-2"-->
<!-- placeholder="Your name here" required>-->
<!-- <input type="email" name="email" class="form-control rounded-2"-->
<!-- placeholder="Your email here" required>-->
<!-- <div class="invalid-feedback text-white">-->
<!-- Please provide a valid email format (e.g.,-->
<!-- user@example.com).-->
<!-- </div>-->
<!-- <button type="submit" class="subs-btn btn btn-block btn-secondary-solid submit_subscribe">Subscribe-->
<!-- now</button>-->
<!--</form>-->
<div class="f-hr"></div>
<p class="text-white">Follow us on social media</p>
<div class="social-box d-flex justify-content-lg-start justify-content-center w-100">
<?php if (have_rows('footer_social_media','option')) : ?>
<?php while (have_rows('footer_social_media','option')) : the_row(); ?>
<?php
$social_url = get_sub_field('footer_social_media_link');
$icon_class = get_sub_field('footer_social_media_class');
$url = !empty($social_url['url']) ? $social_url['url'] : '#';
$target = !empty($social_url['target']) ? $social_url['target'] : '_blank';
?>
<a href="<?php echo esc_url($url); ?>" target="<?php echo esc_attr($target); ?>">
<i class="fa-brands fa-<?php echo esc_attr($icon_class); ?>"></i>
</a>
<?php endwhile; ?>
<?php endif; ?>
</div>
</div>
<div class="col-md-12">
<?php echo do_shortcode('[alphabet_filter]'); ?>
</div>
</div>
<div class=" copy-right row justify-content-center py-4 mt-4 border-top">
<p class=" text-center text-white w-100 mb-0">Copyright © <?php echo date('Y'); ?> <?php echo get_field('copyright','option'); ?></p>
</div>
</div>
</footer>
<!-- #footer end -->
<!-- Overlay -->
<div id="overlay"></div>
<!-- Popup -->
<div id="contactPopup">
<button class="close-btn" id="closePopup">×</button>
<h2>Contact</h2>
<?php echo do_shortcode('[contact-form-7 id="210fa43" title="Popup Form"]'); ?>
<!--<form>-->
<!-- <label for="name">Name</label>-->
<!-- <input type="text" id="name" placeholder="Name">-->
<!-- <label for="email">Email</label>-->
<!-- <input type="email" id="email" placeholder="Email Id">-->
<!-- <label for="phone">Phone</label>-->
<!-- <input type="text" id="phone" placeholder="Phone No">-->
<!-- <label for="message">Message</label>-->
<!-- <textarea id="message" placeholder="Message"></textarea>-->
<!-- <button type="submit">Submit Now</button>-->
<!--</form>-->
<!-- Google Map -->
<div style="margin-top:15px;">
<iframe src="<?php echo get_field('map','option'); ?>" width="100%" height="300px" style="border:0;" allowfullscreen="" loading="lazy" referrerpolicy="no-referrer-when-downgrade"></iframe>
</div>
<div class="contact-details mt-3">
<h3>Contact Details</h3>
<p>Address: <?php echo get_field('address','option'); ?></p>
<p>Need Support? <br> <?php echo get_field('phone_text','option'); ?> <br> <?php echo get_field('email','option'); ?></p>
</div>
</div>
<script>
document.addEventListener("DOMContentLoaded", function () {
const contactPopup = document.getElementById("contactPopup");
const overlay = document.getElementById("overlay");
if (!contactPopup || !overlay) {
return;
}
function openContactPopup() {
contactPopup.style.display = "block";
overlay.style.display = "block";
if (typeof window.initMap === "function") {
setTimeout(function () {
window.initMap();
}, 300);
}
}
function closeContactPopup() {
contactPopup.style.display = "none";
overlay.style.display = "none";
}
document.addEventListener("click", function (e) {
const link = e.target.closest(".contact-popup-link");
if (link) {
e.preventDefault();
openContactPopup();
return;
}
if (e.target === overlay || e.target.id === "closePopup") {
closeContactPopup();
}
});
window.initMap = function () {
const mapElement = document.getElementById("map");
if (!mapElement || typeof google === "undefined") {
return;
}
new google.maps.Map(mapElement, {
center: { lat: 33.4484, lng: -112.0740 },
zoom: 12
});
};
if (!document.getElementById("googleMapsScript")) {
const script = document.createElement("script");
script.id = "googleMapsScript";
script.src = "https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap";
script.async = true;
script.defer = true;
document.head.appendChild(script);
}
});
</script>
<!-- botstrap js plugin -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.6/dist/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
<!-- jq plugin -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<!-- slick slider js plugin -->
<script type="text/javascript" src="//cdn.jsdelivr.net/npm/slick-carousel@1.8.1/slick/slick.min.js"></script>
<!-- js plugin -->
<script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui@5/dist/fancybox/fancybox.umd.js"></script>
<script src="<?php echo bloginfo('template_directory'); ?>/js/main.js"></script>
<script>
jQuery(document).ready(function($) {
let timer;
$('.search-field').on('keyup', function() {
clearTimeout(timer);
let keyword = $(this).val().trim();
if (keyword.length < 1) {
$('.auto-search-results').hide().empty();
return;
}
timer = setTimeout(function() {
$.ajax({
url: '<?php echo admin_url("admin-ajax.php"); ?>',
type: 'POST',
data: {
action: 'auto_thread_search',
keyword: keyword
},
success: function(response) {
if (response.trim() !== '') {
$('.auto-search-results').html(response).show();
} else {
$('.auto-search-results').hide();
}
}
});
}, 300);
});
// Optional: hide when clicking outside
$(document).on('click', function(e) {
if (!$(e.target).closest('.search-box').length) {
$('.auto-search-results').hide();
}
});
});
</script>
<script>
// Initialize Swiper (NO LOOP)
const swiper = new Swiper(".myVideoSlider", {
slidesPerView: 5,
spaceBetween: 20,
loop: true, // <<--- Add this
navigation: {
nextEl: ".swiper-button-next",
prevEl: ".swiper-button-prev",
},
autoplay: {
delay: 2500,
disableOnInteraction: false,
},
breakpoints: {
320: { slidesPerView: 1 },
640: { slidesPerView: 3 },
992: { slidesPerView: 5 }
}
});
// Initialize Fancybox (Latest v5)
Fancybox.bind("[data-fancybox='video-gallery']", {
groupAll: true, // create a gallery group
animated: true,
dragToClose: true,
Toolbar: {
display: ["close"],
}
});
</script>
<!-- video listing popup js -->
<?php wp_footer(); ?>
<!-- footer area end here -->