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
// Technologies filtration | |
var $container = $('.js-technologies-grid'); | |
var $termsBox = $('.js-technologies-terms'); | |
var $termsNav = $('.js-technologies-term'); | |
var $allTermItems = $('.js-technologies-item'); | |
var $loadMoreBtn = $('.js-load-more'); | |
$termsBox.on('click', function(e) { | |
var $target = $(e.target); | |
if ($target.hasClass('js-technologies-term')) { |
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
if($flexible_content = get_field('flexible_content')){ | |
foreach($flexible_content as $key => $section){ | |
$section['module_key'] = $key; | |
show_template($section['acf_fc_layout'], $section, 'parts/flexible-layouts'); | |
} | |
} | |
?> |
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
<section class="user-section"> | |
<div class="container"> | |
<div class="row"> | |
<div class="col-md-4 col-lg-push-8"> | |
<?php if($user_avatar = get_field('user_avatar', 'user_'.$user_id)): ?> | |
<div class="user-section__img-wrap"> | |
<div class="user-section__img" <?php bg($user_avatar, null, 'medium'); ?>></div> | |
</div> | |
<?php endif; ?> | |
</div> |
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
$slider.on('wheel', (function(e) { | |
e.preventDefault(); | |
if (e.originalEvent.deltaY < 0) { | |
$(this).slick('slickNext'); | |
} else { | |
$(this).slick('slickPrev'); | |
} | |
})); |
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
$(window).on('load resize orientationchange', function() { | |
$('.center-slide').each(function(){ | |
var $center_slide = $(this); | |
/* Initializes a slick center_slide only on mobile screens */ | |
// slick on mobile | |
if ($(window).width() >= 1025) { | |
if ($center_slide.hasClass('slick-initialized')) { | |
$center_slide.slick('unslick'); | |
} | |
} |
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
{code} // On click of input field the label became smaller and change to red | |
.gfield { | |
position: relative; | |
&_visibility_hidden { | |
opacity: 0; | |
visibility: hidden; | |
pointer-events: none; | |
} | |
&_label { | |
font-size: 25px; |
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
var is_opera = !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0; | |
var is_Edge = navigator.userAgent.indexOf("Edge") > -1; | |
var is_chrome = !!window.chrome && !is_opera && !is_Edge; | |
var is_explorer= typeof document !== 'undefined' && !!document.documentMode && !is_Edge; | |
var is_firefox = typeof window.InstallTrigger !== 'undefined'; | |
var is_safari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); |
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 | |
add_action( 'bcn_after_fill', 'project_rebuild_breadcrumb' ); | |
/** | |
* Rebuild the breadcrumb created by Breadcrumb NavXT. | |
* | |
* @param bcn_breadcrumb_trail $breadcrumb Instance of the currently active breadcrumb trail. | |
*/ | |
function project_rebuild_breadcrumbs( $breadcrumb ) { | |
if ( ! is_singular( [ 'case-studies', 'articles', 'presentations', 'papers-reports', 'creative-portfolio' ] ) ) { | |
return; |
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
//Curent Term | |
<?php $term = get_term_by( 'slug', get_query_var('term'), get_query_var('taxonomy') ); | |
echo $term->name; ?> | |
//Curent + Parent term | |
<?php $term = get_term_by( 'slug', get_query_var('term'), get_query_var('taxonomy') ); | |
$parent_term = get_term( $term->parent, get_query_var('taxonomy') ); | |
echo $parent_term->name.' : '.$term->name; ?> |
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
/*-------------- Creating custom menu with BEM classes ----------------*/ | |
// Change main menu parameters | |
add_filter( 'wp_nav_menu_args', 'filter_wp_menu_args' ); | |
function filter_wp_menu_args( $args ) { | |
if ( $args['theme_location'] === 'header-menu' || 'blog-menu' ) { | |
$args['container'] = false; | |
$args['items_wrap'] = '<ul class="%2$s">%3$s</ul>'; | |
$args['menu_class'] = 'menu__list'; | |
} |