This file contains hidden or 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
HTML | |
<?php | |
$rows_sr = get_field('staff_repeater'); | |
if($rows_sr) { | |
echo " |
This file contains hidden or 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
$(window).load(function() { | |
$('.class_name_here img').removeAttr( "title" ).removeAttr( "alt" ); | |
}); |
This file contains hidden or 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 click_telephone($telephone, $string = null, $prepend = null, $prepend_zero = null) { | |
/* | |
Parameters: | |
$telephone - string, the actual number | |
$string - string, if you want to dispay a clickable strong rather than telephone number, | |
$prepend - string, prepend the telephone number. | |
$countrycode - string, country code or default UK 0044 |
This file contains hidden or 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
JS ---- | |
(function ($, root, undefined) { | |
$(function () { | |
if ($('body.home').length > 0 ) { | |
$.fancybox({ | |
'width': '100%', | |
'height': '100%', |
This file contains hidden or 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
CSS ---- | |
// Competition Valentines 2016 | |
// if( $('body.valentines-day-win-a-bottle-of-bubby-and-a-50-voucher').length > 0 ) { | |
// var type = window.location.hash.substr(1); | |
// if( type == "competition" ) { | |
// $('html, body').animate({ | |
// scrollTop: $("#mc_embed_signup").offset().top | |
// }, 2000); | |
// } | |
// } |
This file contains hidden or 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
Passing an object through JSON from PHP to JS, to use in PhotoSwipe.js | |
Allows different photo widths and heights in PhotoSwipe lightbox | |
See 'View image gallery' on littlewhitealice.co.uk/our-cottages/fearn-the-alder-house/ | |
---- HTML | |
$output .= "<div class='flexslider'> | |
<ul class='slides'>"; |
This file contains hidden or 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
$( window ).scroll(function() { | |
// if ($('body').not('.home').length > 0 ) { | |
if( $(window).scrollTop() > 0 ) { | |
$('#header').css('box-shadow', '0 1px 3px rgba(0, 0, 0, 0.5)'); | |
} else { | |
$('#header').css('box-shadow', 'none'); | |
} | |
// } | |
}); |
This file contains hidden or 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 | |
$category = get_the_category(); | |
// echo $category[0]->category_parent; | |
$args = array( | |
'post_type' => 'post', | |
'post_status' => 'publish', | |
'posts_per_page' => 1, | |
'post__not_in' => array( get_the_ID() ), |
This file contains hidden or 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 | |
global $query_string; | |
query_posts($query_string . "&post_type=document"); | |
?> | |
<?php if (have_posts()): while (have_posts()) : the_post(); ?> | |
<!-- article --> | |
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> |