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 | |
// Convert Mobile to tel link | |
add_filter('acf/format_value/name=ACF_MOBILE_FIELD_NAME', 'convert_phone_to_link', 20, 3); | |
function convert_phone_to_link ($value, $post_id, $field) { | |
if (!$value) { | |
return $value; | |
} | |
$tel_link = preg_replace('/[^0-9]/', '', $value); |
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 | |
add_filter( 'pre_option_elementor_maintenance_mode_mode', function ( $option ) { | |
$parameter = 'bypass_maintenance'; // change this to whatever you like | |
if ( isset( $_GET['bypass_maintenance'] ) and $_GET['bypass_maintenance'] ) { | |
return 0; // needs to be falsy but not FALSE | |
} |
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
/* GeneratePress Header fix for problem break points | |
Change the 900px value in two places to where you have nav/logo overlap */ | |
@media(min-width:768px) AND (max-width:900px) { | |
.inside-header { | |
display: flex; | |
flex-flow: row wrap; | |
justify-content: center; | |
} | |
#site-navigation { | |
min-width: 900px; |
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
<script> | |
jQuery( document ).ready( function( $ ) { | |
$( '.menu-toggle' ).addClass( 'closed' ); | |
$( document ).on( 'click', '.menu-toggle.closed', function() { | |
var sub = $( this ).next( '.main-nav' ).children( 'ul' ); | |
sub.hide(); | |
sub.slideDown(); | |
$( this ).removeClass( 'closed' ); | |
$( this ).addClass( 'opened' ); | |
}); |
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
@media (max-width: 768px) { | |
.main-navigation .menu-toggle, | |
.main-navigation .mobile-bar-items, | |
.sidebar-nav-mobile:not(#sticky-placeholder) { | |
display: block; | |
} | |
.main-navigation ul, | |
.gen-sidebar-nav { | |
display: 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
/* | |
* Replace all SVG images with inline SVG | |
*/ | |
jQuery('img.svg').each(function(){ | |
var $img = jQuery(this); | |
var imgID = $img.attr('id'); | |
var imgClass = $img.attr('class'); | |
var imgURL = $img.attr('src'); | |
jQuery.get(imgURL, function(data) { |
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 | |
$location = get_field('map_location'); | |
if ( !empty( $location ) ) : | |
$map_url = 'https://www.google.com/maps/dir/?api=1&destination=' . $location['lat'] . ',' . $location['lng']; | |
echo '<a href=". esc_url( $map_url ) . '" rel="nooopener">Get directions</a>'; | |
endif; | |
?> | |
<p>This should produce a link like this:</p> | |
<a href="https://www.google.com/maps/dir/?api=1&destination=51.072159,1.088130">Get directions</a> |
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 | |
/* | |
Plugin Name: Gravity Forms Fields Above | |
Plugin URI: https://gist.github.com/webaware/24e1bacb47b76a6aee7f | |
Description: move field labels from below to above fields in compound fields (e.g. Address, Name) | |
Version: 1 | |
Author: WebAware | |
Author URI: http://webaware.com.au/ | |
@link http://www.gravityhelp.com/forums/topic/change-position-of-sub-labels-on-advanced-fields |
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
/* | |
Source: http://typecast.com/blog/contrast-through-scale | |
The 16th century scale: | |
6, 7, 8, 9, 10, 11, 12, 14, 16, 18, 21, 24, 26, 48, 60, 72 | |
*/ | |
body { font-size:100%; } | |
h1 { font-size: 2.25em; /* 16 x 2.25 = 36 */ } | |
h2 { font-size: 1.5em; /* 16 x 1.5 = 24 */ } |
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
(function($) { | |
$('a[href*=#]:not([href=#])').click(function() | |
{ | |
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') | |
|| location.hostname == this.hostname) | |
{ | |
var target = $(this.hash), | |
headerHeight = $(".primary-header").height() + 5; // Get fixed header height | |
NewerOlder