Skip to content

Instantly share code, notes, and snippets.

@jbd91
jbd91 / snippet.php
Created February 2, 2018 03:56
Media Queries
/** Mobile **/
@media only screen and (max-width: 767px), only screen and (max-device-width: 767px) {
}
/** Tablet **/
@media only screen and (min-width : 768px) and (max-width : 1024px) {
@jbd91
jbd91 / snippet.scss
Created February 2, 2018 03:57
Slick Slider Margin
.slick-slide {
margin: 0 10px;
}
.slick-list {
margin: 0 -10px;
}
@jbd91
jbd91 / snippet.scss
Last active February 13, 2018 22:21
Slick Slider Arrows
.slick-slider {
.slick-prev {
&:before {
}
}
.slick-next {
@jbd91
jbd91 / snippet.js
Last active July 18, 2018 16:54
Waypoints (Deprecated)
var waypoint = new Waypoint({
element: jQuery('.logo-area'),
handler: function(direction) {
if(direction === "up"){
jQuery('#sticky-nav--container').removeClass('sticky');
} else {
jQuery('#sticky-nav--container').addClass('sticky');
}
}
});
@jbd91
jbd91 / snippet.js
Created February 2, 2018 03:59
Mix It Up
if(jQuery('.project-profile-listings').length) {
var mixer = mixitup('.project-profile-listings', {
animation: {
duration: 300
}
});
}
@jbd91
jbd91 / snippet.php
Created February 2, 2018 04:00
ACF Custom Title
<h1>
<?php if( get_field('custom_title') ): ?>
<?php the_field('custom_title'); ?>
<?php else: ?>
<?php the_title(); ?>
<?php endif; ?>
</h1>
@jbd91
jbd91 / snippet.php
Last active July 9, 2020 18:44
ACF Repeater
<?php if( have_rows('') ) : ?>
<?php while( have_rows('') ) : the_row(); ?>
<?php endwhile; ?>
<?php endif; ?>
@jbd91
jbd91 / snippet.php
Created February 2, 2018 04:01
Slick Slider ACF Repeater
<?php if( have_rows('') ): ?>
<div class="slider-name">
<?php while ( have_rows('') ) : the_row(); ?>
<div>
</div>
@jbd91
jbd91 / snippet.php
Created February 2, 2018 04:02
ACF Select
<?php $related_posts = get_field( 'acf_select' ); ?>
<?php if($related_posts): ?>
<?php foreach($related_posts as $post): ?>
<?php setup_postdata($post); ?>
<?php $page_id = get_the_ID(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
@jbd91
jbd91 / snippet.php
Created February 2, 2018 04:02
ACF Repeater with Counter
<?php if(get_field('')): $i = 0; ?>
<?php while(has_sub_field('')): $i++; ?>
<div class="section-<?php echo $i; ?>">
</div>
<?php endwhile; ?>