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
// filter relevanssi based on job_region query | |
add_filter('relevanssi_modify_wp_query', 'region_tax_query'); | |
function region_tax_query($query) { | |
$tax_query = array(); | |
if (!empty($query->query_vars['job_region'])) { | |
$tax_query[] = array( | |
'taxonomy' => 'region', | |
'field' => 'id', | |
'terms' => $query->query_vars['job_region'] |
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 | |
// Manually create entries and send notifications with Gravity Forms | |
$form_id = 10; | |
// add entry | |
$entry = array( | |
"form_id" => $form_id, | |
"1" => "Entry for field ID 1", |
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
:root { | |
--gutter: 32px; | |
} | |
@media screen and (min-width: 782px) { | |
/* For the '25's' in the 25 / 50 / 25 variation */ | |
.wp-block-column[style='flex-basis:25%'] { | |
flex-basis: calc(var(--gutter) * 2) !important; |
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
// This is the page template file |
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
/* | |
* Layout debugging display | |
*/ | |
body { | |
&.env--local { | |
.site-wrapper { | |
&:after { | |
content: 'default'; | |
position: fixed; |
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
/* | |
* Layout debugging display | |
*/ | |
body { | |
&.env--local { | |
&:after { | |
content: 'default'; | |
position: fixed; | |
bottom: 0; | |
right: 0; |
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
/* | |
* Layout debugging display | |
*/ | |
body { | |
&.env--local { | |
.grid-overlay { | |
display: none; | |
position: fixed; | |
z-index: 99999999; |
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 | |
/** | |
* This function appends a grid overlay div to the body depending on the environment. | |
* | |
*/ | |
function tgf_add_grid_overlay_debugging_helper() { | |
if ( WP_LOCAL ) { | |
// echo the script |
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 | |
/** | |
* This function appends a class to the body depending on the environment. | |
* | |
* @param array $classes current body classes. | |
* | |
* @return array $classes any modification to the class array. | |
*/ | |
function tgf_add_environment_class( $classes ) { |
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
// make sure this script is called in the footer of your document | |
function inView(image){ | |
var $image = jQuery(image), | |
view_top = jQuery(window).scrollTop() - 300, | |
view_bottom = view_top + jQuery(window).height() + 600, | |
height = $image.height(), | |
_top = $image.offset().top, | |
_bottom = _top + height; | |
return height > 0 && _top <= view_bottom && _bottom >= view_top; |
NewerOlder