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 | |
$args = array ( | |
'post_type' => 'post', | |
'posts_per_page' => -1, | |
'status' => 'publish' | |
); | |
$query = new WP_Query( $args ); | |
?> |
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
if ( get_field('image') ) { | |
$image = get_field('image'); | |
// Some useful keys. | |
// $image['url'] - Full size image. | |
// $image['sizes']['medium'] - Medium size image. | |
// $image['alt'] - Image Alternative text field. | |
// $image['title'] - Image title field. | |
// $image['caption'] - Image caption field. |
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 | |
$repeaterName = 'repeater'; | |
$pageId = NULL; // Just in case. | |
?> | |
<?php if ( have_rows( $repeaterName, $pageId ) ) : ?> | |
<?php while ( have_rows($repeaterName, $pageId) ) : the_row(); ?> | |
<?php the_sub_field('sub_field_name'); ?> | |
<?php endwhile; ?> |
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 classSwap(classOne, classTwo, target) { | |
if ( $(target).hasClass(classOne) ) { | |
$(target).removeClass(classOne).addClass(classTwo); | |
} | |
else if ( $(target).hasClass(classTwo) ) { | |
$(target).removeClass(classTwo).addClass(classOne); | |
} | |
else { | |
$(target).addClass(classOne); | |
} |
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 placeAfter(element, destination) { | |
var element = $(element); | |
element.remove().clone().insertAfter( destination); | |
} |
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
$.fn.exists = function () { | |
return this.length !== 0; | |
}; |
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
.gform_wrapper { | |
form .gform_body .ginput_complex input[type=text] { | |
width:100% !important; | |
} | |
input, input[type=text], select, textarea { | |
width:100% !important; | |
@include box-sizing(border-box); | |
} | |
} |
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
var $state; | |
function breakSetup( $breakwidth, $operator, $callback ) { | |
var w = $(window), | |
$width = w.width(); | |
var operators = { | |
'<' : function( a, b ) { return a < b ; }, | |
'>' : function( a, b ) { return a > b ; }, | |
'<=' : function( a, b ) { return a <= b ; }, |
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 is_empty(&$val) { | |
return empty($val) && $val !== "0"; | |
} |
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
$mobileColumn: 400; | |
$narrowColumn: 700; | |
$multiColumn: 1000; | |
$mainWidth: $narrowColumn - 40; | |
$multiWidth: $multiColumn - 40; | |
$narrowWidth: 95%; | |
$mobileWidth: 90%; | |
@mixin breakpoint($point) { |
OlderNewer