You are on page 1of 6

<?

php
/**
* The template for displaying the footer
*/

?>

<?php

$logo_dark = get_field('footer_logo', 'option');


$copyright = get_field('copyright', 'option');
$email = get_field('email', 'option');
$phone = get_field('phone', 'option');
$contact_title = get_field('contact_title', 'option');
$contact_content = get_field('contact_content', 'option');
$address_1 = get_field('address_1', 'option');
$address_2 = get_field('address_2', 'option');
$map_api = get_field('map_api', 'option');
$map_lat = get_field('map_lat', 'option');
$map_lng = get_field('map_lng', 'option');

$facebook = get_field('facebook', 'option');


$twitter = get_field('twitter', 'option');
$instagram = get_field('instagram', 'option');
$pinterest = get_field('pinterest', 'option');
$google = get_field('google', 'option');
$linkedin = get_field('linkedin', 'option');
$youtube = get_field('youtube', 'option');
$yelp = get_field('yelp', 'option');

?>
<!--
<?php if($facebook!=""): ?><?php echo $facebook; ?><?php else: ?>dsdsd<?php
endif; ?>
-->
<footer>
<div id="footer" class="grey">
<div class="inner">
<?php if($contact_title!=""): ?>
<div class="section-title">
<h2><?php echo $contact_title; ?></h2>
<p><?php echo $contact_content; ?></p>
</div><!--section-title-->
<?php endif; ?>
<div class="footer-content">
<div class="row">
<?php if($address_1!=""): ?>
<div class="col-md-4">
<div class="footer-info clearfix">
<div class="col-md-2 nofloat text-center">
<i class="fa fa-map-marker"></i>
</div><!--col-->
<div class="col-md-10 nofloat">
<span><?php echo $address_1; ?> <br /><?php
echo $address_2; ?></span>
</div><!--col-->
</div><!--footer-info-->
</div><!--col-->
<?php endif; ?>
<?php if($email!="" && get_field('email_footer', 'option')): ?>
<div class="col-md-4">
<div class="footer-info clearfix">
<div class="col-md-3 nofloat text-center">
<i class="fa fa-envelope"></i>
</div><!--col-->
<div class="col-md-9 nofloat">
<span><strong>General Inquiries </strong> <a
href="mailto:<?php echo $email; ?>"><?php echo $email; ?></a></span>

</div><!--col-->
</div><!--footer-info-->
</div><!--col-->
<?php endif; ?>
<?php if($phone!="" && get_field('phone_footer', 'option') ): ?>
<div class="col-md-4">
<div class="footer-info clearfix">
<div class="col-md-2 nofloat text-center">
<i class="fa fa-phone"></i>
</div><!--col-->
<div class="col-md-10 nofloat">
<span><strong>Call Us Today! </strong> <a
href="tel:<?php echo $phone; ?>"><?php echo $phone; ?></a></span>
</div><!--col-->
</div><!--footer-info-->
</div><!--col-->
<?php endif; ?>
</div><!--row-->

<!--<div class="footer-map">

<iframe src="https://www.google.com/maps/embed?pb=!
1m18!1m12!1m3!1d1865.3615082674116!2d-156.45559749173734!3d20.762017767186943!2m3!
1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x7954d038cb42fd5f
%3A0x5325cff14a5a9477!2sNick+Ponte+Marketing!5e0!3m2!1sen!2sph!4v1497088841648"
frameborder="0" style="border:0" allowfullscreen></iframe>

</div>--><!--footer-map-->

</div><!--footer-content-->

</div><!--inner-->

<?php if(get_field('map_lat', 'option') && get_field('map_lng', 'option')) : ?>


<div id="map"></div>
<?php endif; ?>

</div><!--footer-->

<?php if ( is_active_sidebar( 'footer-menu' ) ) : ?>


<div class="footer-menu">
<div class="inner">
<?php dynamic_sidebar( 'footer-menu' ); ?>
</div>
</div>
<?php endif; ?>

<div class="copyright">
<div class="inner">
<div class="row">
<div class="col-md-3 footer-logo">
<div class="copyright-section">
<?php if($logo_dark!="") : ?><img src="<?php echo
$logo_dark; ?>" /><?php else: ?><img src="<?php echo
get_template_directory_uri(); ?>/images/logo_dark.png" /><?php endif; ?>
</div><!--copyright-section-->
</div><!--col-->
<div class="col-md-6 display-table text-center">
<div class="copyright-section">
<?php if($copyright!=""): ?>
<?php echo $copyright; ?>
<?php else: ?>
<span>Copyright &copy; <?php echo date('Y'); ?>. All
Rights Reserved. <?php echo bloginfo('name'); ?></span>
<?php endif; ?>
</div><!--copyright-section-->
</div><!--col-->
<div class="col-md-3 display-table text-center">
<div class="copyright-section">
<ul class="footer-social">
<?php if($facebook!=""): ?><li><a href="<?php echo
$facebook; ?>"><i class="fa fa-facebook"></i></a></li><?php endif; ?>
<?php if($twitter!=""): ?><li><a href="<?php echo
$twitter; ?>"><i class="fa fa-twitter"></i></a></li><?php endif; ?>
<?php if($google!=""): ?><li><a href="<?php echo
$google; ?>"><i class="fa fa-google"></i></a></li><?php endif; ?>
<?php if($linkedin!=""): ?><li><a href="<?php echo
$linkedin; ?>"><i class="fa fa-linkedin"></i></a></li><?php endif; ?>
<?php if($youtube!=""): ?><li><a href="<?php echo
$youtube; ?>"><i class="fa fa-youtube"></i></a></li><?php endif; ?>
<?php if($pinterest!=""): ?><li><a href="<?php echo
$pinterest; ?>"><i class="fa fa-pinterest"></i></a></li><?php endif; ?>
<?php if($yelp!=""): ?><li><a href="<?php echo
$yelp; ?>"><i class="fa fa-yelp"></i></a></li><?php endif; ?>
<?php if($instagram!=""): ?><li><a href="<?php echo
$instagram; ?>"><i class="fa fa-instagram"></i></a></li><?php endif; ?>
</ul>
</div><!--copyright-section-->
</div><!--col-->
</div><!--row-->
</div><!--inner-->
</div><!--copyright-->
</footer>

</div><!--#cp-wrapper-->

<!--back to top-->
<a class="scroll backtotop" href="#cp-wrapper"><i class="fa fa-angle-
up"></i></a>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="<?php echo get_template_directory_uri(); ?
>/js/bootstrap.min.js"></script>
<script src="<?php echo get_template_directory_uri(); ?
>/js/wow.min.js"></script>
<script src="<?php echo get_template_directory_uri(); ?
>/js/owl.carousel.min.js"></script>

<script src="<?php echo get_template_directory_uri(); ?


>/js/lightbox.min.js"></script>
<script src="<?php echo get_template_directory_uri(); ?
>/js/isotope.pkgd.min.js"></script>
<script src="<?php echo get_template_directory_uri(); ?
>/js/imagesloaded.min.js"></script>

<script src="<?php echo get_template_directory_uri(); ?


>/js/script.js"></script>
<script src="https://maps.googleapis.com/maps/api/js?key=<?php if($map_api!
=""): ?><?php echo $map_api; ?><?php else : ?>AIzaSyARhHVwWAThafW1eF_4w-
cNeDJBT8OY2dM<?php endif; ?>"></script>

<script>

jQuery(function () {

function initMap() {

var location = new google.maps.LatLng(<?php if($map_lat!=""): ?><?php echo


$map_lat; ?><?php else : ?>20.7621895<?php endif; ?>,<?php if($map_lng!=""): ?><?
php echo $map_lng; ?><?php else : ?>-156.4563268<?php endif; ?>);

var mapCanvas = document.getElementById('map');


var mapOptions = {
center: location,
zoom: <?php if(get_field('map_zoom', 'option')) : ?><?php
the_field('map_zoom', 'option'); ?><?else: ?>15<?php endif; ?>,
panControl: false,
scrollwheel: false,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
var map = new google.maps.Map(mapCanvas, mapOptions);

var markerImage = '<?php echo get_template_directory_uri(); ?


>/images/pointer.png';

var marker = new google.maps.Marker({


position: location,
map: map,
icon: markerImage
});

var contentString = '<div class="info-window">' +


'<h3><?php echo bloginfo('name'); ?></h3>' +
'<div class="info-content">' +
'<p>Email: <a href="mailto:<?php if($email!=""): ?><?php echo
$email; ?><?php else: ?>info@yourdomain.com<?php endif; ?>"><?php if($email!=""): ?
><?php echo $email; ?><?php else: ?>info@yourdomain.com<?php endif; ?></a></p>' +
'<p>Phone: <a href="tel:<?php if($phone!=""): ?><?php echo
$phone; ?><?php else: ?>+44 (0) 123 456 7890<?php endif; ?>"><?php if($phone!
=""): ?><?php echo $phone; ?><?php else: ?>+44 (0) 123 456 7890<?php endif; ?
></a></p>' +
'<?php if($address_1!=""): ?><p>Address: <?php echo $address_1; ?>
<br /><?php echo $address_2; ?></p><?php endif; ?>' +
'</div>' +
'</div>';

var infowindow = new google.maps.InfoWindow({


content: contentString,
maxWidth: 400
});

marker.addListener('click', function () {
infowindow.open(map, marker);
});

var styles = [{"featureType": "landscape", "stylers": [{"saturation":


-100}, {"lightness": 65}, {"visibility": "on"}]}, {"featureType": "poi", "stylers":
[{"saturation": -100}, {"lightness": 51}, {"visibility": "simplified"}]},
{"featureType": "road.highway", "stylers": [{"saturation": -100}, {"visibility":
"simplified"}]}, {"featureType": "road.arterial", "stylers": [{"saturation": -100},
{"lightness": 30}, {"visibility": "on"}]}, {"featureType": "road.local", "stylers":
[{"saturation": -100}, {"lightness": 40}, {"visibility": "on"}]}, {"featureType":
"transit", "stylers": [{"saturation": -100}, {"visibility": "simplified"}]},
{"featureType": "administrative.province", "stylers": [{"visibility": "off"}]},
{"featureType": "water", "elementType": "labels", "stylers": [{"visibility": "on"},
{"lightness": -25}, {"saturation": -100}]}, {"featureType": "water", "elementType":
"geometry", "stylers": [{"hue": "#ffff00"}, {"lightness": -25}, {"saturation":
-97}]}];

map.set('styles', styles);

google.maps.event.addDomListener(window, 'load', initMap);


});

</script>

<script type="text/javascript">
//<![CDATA[
jQuery(window).load(function() { // makes sure the whole site is loaded
jQuery('#status').fadeOut(); // will first fade out the loading
animation
jQuery('#preloader').delay(350).fadeOut('slow'); // will
fade out the white DIV that covers the website.
jQuery('body').delay(350).css({'overflow-y':'visible'});
})
//]]>
</script>

<?php wp_footer(); ?>

</body>
</html>