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 ($("#contact").length) { | |
function initialize() { | |
var myLatLong = new google.maps.LatLng(40.7526, -73.9797); | |
var mapOptions = {center: myLatLong,scrollwheel: false,zoom: 13}; | |
var map = new google.maps.Map(document.getElementById("map-canvas"), mapOptions); | |
var marker = new google.maps.Marker({position: myLatLong,map: map,title: "123 Broadway"}); | |
} | |
google.maps.event.addDomListener(window, 'load', initialize); | |
} |
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
add_action( 'wp_enqueue_scripts', 'conditional_load_enqueue' ); | |
function conditional_load_enqueue() { | |
if ( is_singular(array('foo', 'bar', 'baz' )) ) { | |
wp_enqueue_script('flickity', get_template_directory_uri() . '/bower_components/flickity/dist/flickity.pkgd.min.js', array('jquery'), '0.3.1', true); | |
} |
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
/* Calculate fluid ratio based on two dimensions (width/height) */ | |
@mixin fluid-ratio($large-size, $small-size) { | |
$width-large: nth($large-size, 1); | |
$width-small: nth($small-size, 1); | |
$height-large: nth($large-size, 2); | |
$height-small: nth($small-size, 2); | |
$slope: ($height-large - $height-small) / ($width-large - $width-small); | |
$height: $height-small - $width-small * $slope; | |
padding-top: $slope * 100%; |
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 if ( is_home() ) { // If on the homepage ?> | |
<!--/ Open Graph for Homepage /--> | |
<meta property="og:title" content="<?php echo get_bloginfo(strip_tags('name')) ?>" /> | |
<meta property="og:type" content="website" /> | |
<meta property="og:url" content="<?php echo home_url() ?>" /> | |
<meta property="og:description" content="<?php echo get_bloginfo (strip_tags('description')) ?>" /> | |
<meta property="og:site_name" content="<?php echo get_bloginfo(strip_tags('name')) ?>" /> | |
<meta property="og:image" content="http://unglove.me/path-to-thumbnail-image.jpg" /> | |
<?php } ?> | |
<?php if ( is_woocommerce() ) { // If on a woocommerce page ?> |
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
/* | |
Cross-browser (including IE8-10) | |
Más info: http://coding.smashingmagazine.com/2013/08/09/absolute-horizontal-vertical-centering-css/ | |
*/ | |
.absolute-center { | |
/* height: must be declared */ | |
margin: auto; | |
position: absolute; | |
top: 0; left: 0; bottom: 0; right: 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
<!-- HTML5 shim, for IE6-8 support of HTML5 elements --> | |
<!--[if lt IE 9]> | |
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> | |
<![endif]--> |