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
$(function() { | |
$('a[href*="#"]:not([href="#"])').click(function() { | |
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { | |
var target = $(this.hash); | |
target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); | |
if (target.length) { | |
$('html, body').animate({ | |
scrollTop: target.offset().top | |
}, 1000); | |
return 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
// Adding Custom Post Types to Tag/Category Results | |
function add_custom_types_to_tax( $query ) { | |
if( is_category() || is_tag() && empty( $query->query_vars['suppress_filters'] ) ) { | |
// Get all your post types | |
$post_types = get_post_types(); | |
$query->set( 'post_type', $post_types ); | |
return $query; | |
} |
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
AL : Alabama | |
AK : Alaska | |
AZ : Arizona | |
AR : Arkansas | |
CA : California | |
CO : Colorado | |
CT : Connecticut | |
DE : Delaware | |
FL : Florida | |
GA : Georgia |
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
$(function() { | |
$('a[href*="#"]:not([href="#"])').click(function() { | |
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { | |
var target = $(this.hash); | |
target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); | |
if (target.length) { | |
$('html, body').animate({ | |
scrollTop: target.offset().top | |
}, 1000); | |
return 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
/********************* | |
ANGLED MASKS | |
*********************/ | |
@mixin angled-mask($pseudo, $flip: false, $angle: 1.5deg) { | |
// Possible values for $pseudo are: before, after, both | |
@if $pseudo == 'before' or $pseudo == 'after' or $pseudo == 'both' { | |
position: relative; | |
z-index: 1; | |
$selector: if($pseudo == 'both', '&:before,&:after', '&:#{$pseudo}'); |
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
// Multiple DIVs as a true background-image | |
function addTriangleTo(target) { | |
var dimensions = target.getClientRects()[0]; | |
var pattern = Trianglify({ | |
width: dimensions.width, | |
height: dimensions.height | |
}); | |
target.style['background-image'] = 'url(' + pattern.png() + ')'; | |
} |
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 | |
/** | |
* Extend WordPress search to include custom fields | |
* | |
* http://adambalee.com | |
*/ | |
/** | |
* Join posts and postmeta tables | |
* |
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
/* Mixin */ | |
@mixin vertical-align($position: relative) { | |
position: $position; | |
top: 50%; | |
-webkit-transform: translateY(-50%); | |
-ms-transform: translateY(-50%); | |
transform: translateY(-50%); | |
} | |
.element p { |
OlderNewer