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 | |
$all_tax_a_terms = get_terms( array( 'taxonomy' => 'taxonomy_a', 'hide_empty' => false) ); | |
foreach ($all_tax_a_terms as $a_term) { | |
$b_terms_set_to_a_term = get_terms( array( | |
'taxonomy' => 'taxonomy_b', | |
'meta_key' => 'acf-key-for-taxonomy-b', | |
'meta_value' => $a_term->slug, | |
'hide_empty' => 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
<?php | |
if ( ! function_exists('paginate_links_as_bootstrap') ) : | |
/** | |
* paginate_links_as_bootstrap() | |
* JPS 20170330 | |
* Wraps paginate_links data in Twitter bootstrap pagination component | |
* @param array $args { | |
* Optional. {@see 'paginate_links'} for native argument list. | |
* | |
* @type string $nav_class classes for <nav> element. Default empty. |
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 | |
/** | |
* Child theme support for acf-json | |
* This will load acf-json from the parent theme first. | |
* That way if a child theme's acf-json folder contains a .json | |
* file with the same name as the parent, it will get loaded second | |
*/ | |
add_filter('acf/settings/save_json', function() { | |
return get_stylesheet_directory() . '/acf-json'; | |
}); |
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 | |
if ( ! function_exists('paginate_links_as_bootstrap') ) : | |
/** | |
* paginate_links_as_bootstrap() | |
* https://gist.github.com/joelstransky/86f7b77f89fc24851f64e7b7bd6df368 | |
* Wraps paginate_links data in Twitter bootstrap pagination component | |
* @param array $args { | |
* Optional. {@see 'paginate_links'} for native argument list. | |
* | |
* @type string $nav_class classes for <nav> element. Default empty. |
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 | |
if ( ! function_exists('write_log')) { | |
function write_log ( $log ) { | |
if ( is_array( $log ) || is_object( $log ) ) { | |
error_log( print_r( $log, true ) ); | |
} else { | |
error_log( $log ); | |
} | |
} | |
} |
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
/** | |
* https://philipwalton.com/articles/normalizing-cross-browser-flexbox-bugs/ | |
* 1. Avoid the IE 10-11 `min-height` bug. | |
* 2. Set `flex-shrink` to `0` to prevent Chrome, Opera, and Safari from | |
* letting these items shrink to smaller than their content's default | |
* minimum size. | |
*/ | |
.Site { | |
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
// demo: http://codepen.io/JoelStransky/pen/VKPVAG | |
// breakpoint list ('column type', 'screen breakpoint', 'container width @ break point') | |
$breakpoints: ( ('xs', $screen-xs, $screen-xs), ('sm', $screen-sm, $container-sm), ('md', $screen-md, $container-md), ('lg', $screen-lg, $container-lg) ); | |
@mixin make-fixed-grid() { | |
@each $item in $breakpoints { | |
@media (min-width: #{nth($item, 2)} ) { | |
// background: red; | |
@include make-fixed-grid-columns( $grid-columns, nth($item, 1), width, nth($item, 3) ); | |
} |
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 $field = get_field_object('field_123a456b78c90'); ?> |