This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
div.logo { | |
margin:0 auto; | |
border:1px solid #666; | |
width:400px; | |
height:215px; | |
background:url(james-n-nick.jpg) no-repeat; | |
} | |
@media only screen and (-webkit-min-device-pixel-ratio: 2), | |
only screen and (-webkit-min-device-pixel-ratio: 1.5), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div itemscope itemtype="http://schema.org/LocalBusiness"> | |
<span itemprop="legalName">Company Name Ltd</span> | |
<div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress"> | |
<span itemprop="streetAddress">12 Paper Street,</span> | |
<span itemprop="addressLocality">Town</span>, | |
<span itemprop="addressRegion">County</span> | |
<span itemprop="postalCode">AB01 1YZ</span> | |
</div> | |
Phone: <span itemprop="telephone">01234 123456</span> | |
Email: <span itemprop="email">email@companydomain.co.uk</span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(document).ready(function ($) { | |
$('#navquote').on('click', function() { | |
ga('send', 'event', 'Quick Quote Call To Action', 'click', 'Launch Lightbox Form'); | |
}); | |
$('#headerphone').on('click', function() { | |
ga('send', 'event', 'Phone Number Touch/Click', 'click', 'Header'); | |
}); | |
$('#footerphone').on('click', function() { | |
ga('send', 'event', 'Phone Number Touch/Click','click', 'Footer'); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/////////////////////////////////////////////// | |
////////// Projects Custom Post Type ////////// | |
/////////////////////////////////////////////// | |
add_action('init', 'register_projects'); | |
function register_projects() { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php function remove_parent_classes($class) | |
{ | |
// check for current page classes, return false if they exist. | |
return ($class == 'current_page_item' || $class == 'current_page_parent' || $class == 'current_page_ancestor' || $class == 'current-menu-item') ? FALSE : TRUE; | |
} | |
function add_class_to_wp_nav_menu($classes) | |
{ | |
switch (get_post_type()) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div itemscope itemtype="http://schema.org/Organization"> | |
<?php | |
$attachment_id = 2; // Upload your client's logo to the Media Library and add the attachment ID here (swap the 2) | |
$image_attributes = wp_get_attachment_image_src( $attachment_id ); | |
?> | |
<a itemprop="url" href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" id="logolink"> | |
<img itemprop="logo" src="<?php echo $image_attributes[0]; ?>" id="mainlogo" alt="<?php echo get_bloginfo ( 'description' ); ?>" /> | |
</a> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
///////////////////////////////////////////////////////////////////////////////////// | |
////////// Allow SVGs to be uploaded via the Media Centre within WordPress ////////// | |
///////////////////////////////////////////////////////////////////////////////////// | |
function cc_mime_types( $mimes ){ | |
$mimes['svg'] = 'image/svg+xml'; | |
return $mimes; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(document).ready(function ($) { | |
$('#quote').on('click', function() { // Tracks clicks for the <a> tag with id="quote" | |
ga('send', 'event', 'button', 'click', 'Quick Form Lightbox Impressions'); | |
}); | |
$('#phonenumber').on('click', function() { // Tracks clicks for the <a> tag with id="phonenumber" | |
ga('send', 'event', 'link', 'click', 'Header Phone Clicks/Touches'); | |
}); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$is-hidpi:" (-webkit-min-device-pixel-ratio: 1.5), | |
(min--moz-device-pixel-ratio: 1.5), | |
(-o-min-device-pixel-ratio: 3/2), | |
(min-device-pixel-ratio: 1.5), | |
(min-resolution: 1.5dppx)"; | |
@mixin retinize($file, $type){ | |
background-image: url('images/' + $file + '.' + $type); | |
@media #{$is-hidpi}{ |