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
.contact-outer { | |
.contact-halves { | |
display: flex; | |
justify-content: space-between; | |
@media (max-width: 767px) { | |
flex-direction: column; | |
} | |
.contact-left { | |
display: flex; | |
flex-direction: column; |
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
<? | |
// lets assume the ACF field we want to create an excerpt for is called 'content' | |
$raw_content = get_field('content'); | |
$trimmed_content = wp_trim_words($raw_content); | |
$clean_excerpt = apply_filters('the_excerpt', $trimmed_content); | |
echo $clean_excerpt; | |
?> |
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
<script> | |
(function ($) { | |
$(document).on('click', '.fading-menu a', function (event) { | |
event.preventDefault(); | |
var target = $(this).attr('href'); | |
$('body').fadeOut(function () { | |
window.location = target; | |
}); | |
}); | |
})(jQuery); |
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
<? | |
/* | |
In this example our ACF field is 'footer_phone_number' | |
* | |
$original = '+44 (0)1234 567 890'; | |
$original = '0044 01234 567 890'; | |
$original = '01234 567 890'; | |
$original = '44 1234 567 890'; | |
Result should always be: | |
'+441234567890 |
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
Array | |
( | |
[0] => Array | |
( | |
[ID] => 840 | |
[id] => 840 | |
[title] => creativebacon | |
[filename] => creativebacon.jpg | |
[filesize] => 67847 | |
[url] => http://localhost:8888/FreshLondon/wp-content/uploads/2016/01/creativebacon.jpg |
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
<? function metersToFeetInches($meters, $echo = true) { | |
$m = $meters; | |
$valInFeet = $m * 3.2808399; | |
$valFeet = (int)$valInFeet; | |
$valInches = round(($valInFeet - $valFeet) * 12); | |
$data = $valFeet."′".$valInches."″"; | |
if ($echo == true) { | |
echo $data; | |
} else { | |
return $data; |
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
// | |
// MEDIA QUERIES | |
//–––––––––––––––––––––––––––––––––––––––––––––––––– | |
// A map of breakpoints. | |
$breakpoints: ( | |
xs: 576px, | |
sm: 768px, | |
md: 992px, | |
lg: 1200px |
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
<? | |
/** | |
* Strips posts from search queries if ACF meta value post_is_hidden is active. | |
* | |
* @author AM.HIGH | |
* @version 1.0.0 | |
* @since 1.0.0 | |
*/ | |
function dontSearchTheHidden($query) { |
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
<? | |
function _get_all_image_sizes() { | |
global $_wp_additional_image_sizes; | |
$default_image_sizes = get_intermediate_image_sizes(); | |
foreach ( $default_image_sizes as $size ) { | |
$image_sizes[ $size ][ 'width' ] = intval( get_option( "{$size}_size_w" ) ); | |
$image_sizes[ $size ][ 'height' ] = intval( get_option( "{$size}_size_h" ) ); | |
$image_sizes[ $size ][ 'crop' ] = get_option( "{$size}_crop" ) ? get_option( "{$size}_crop" ) : false; |
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
<? | |
global $_wp_additional_image_sizes; | |
print '<pre>'; | |
print_r( $_wp_additional_image_sizes ); | |
print '</pre>'; | |
?> |