You are on page 1of 6


* The template for displaying the footer



$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; ?>
<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>
<?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 class="col-md-10 nofloat">
<span><?php echo $address_1; ?> <br /><?php
echo $address_2; ?></span>
<?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 class="col-md-9 nofloat">
<span><strong>General Inquiries </strong> <a
href="mailto:<?php echo $email; ?>"><?php echo $email; ?></a></span>

<?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 class="col-md-10 nofloat">
<span><strong>Call Us Today! </strong> <a
href="tel:<?php echo $phone; ?>"><?php echo $phone; ?></a></span>
<?php endif; ?>

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

<iframe src="!
frameborder="0" style="border:0" allowfullscreen></iframe>




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

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


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

<div class="footer-menu">
<div class="inner">
<?php dynamic_sidebar( 'footer-menu' ); ?>
<?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 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 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; ?>


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

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

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

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

<script src="<?php if($map_api!
=""): ?><?php echo $map_api; ?><?php else : ?>AIzaSyARhHVwWAThafW1eF_4w-
cNeDJBT8OY2dM<?php endif; ?>"></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(); ?


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: ?><?php endif; ?>"><?php if($email!=""): ?
><?php echo $email; ?><?php else: ?><?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>' +

var infowindow = new google.maps.InfoWindow({

content: contentString,
maxWidth: 400

marker.addListener('click', function () {, 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":

map.set('styles', styles);

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



<script type="text/javascript">
jQuery(window).load(function() { // makes sure the whole site is loaded
jQuery('#status').fadeOut(); // will first fade out the loading
jQuery('#preloader').delay(350).fadeOut('slow'); // will
fade out the white DIV that covers the website.

<?php wp_footer(); ?>