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 ($foo) { ?> | |
<div class="mydiv">Condition is true</div> | |
<?php } else { ?> | |
<div class="myotherdiv">Condition is false</div> | |
<?php } ?> |
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
// Be careful as the 'key' ( = name of the field) is case sensitive | |
<?php echo get_post_meta($post->ID, 'key', true); ?> | |
<?php // From http://css-tricks.com/snippets/wordpress/using-custom-fields/ ?> |
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
$(".ruka, .ruka div").delay(1000).fadeIn(400).delay(3000); | |
$(".ruka div").fadeOut(200); | |
$(document).ready(function () { | |
// hand movement: 45angle to the left and then upwards | |
var vlavoHore = { | |
start: { |
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
$('a').click(function(){ | |
$('html, body').animate({ | |
scrollTop: $( $.attr(this, 'href') ).offset().top | |
}, 500); | |
return false; | |
}); | |
// http://stackoverflow.com/questions/7717527/jquery-smooth-scrolling-when-clicking-an-anchor-link/7717572#7717572?newreg=16ca424bc4024b21a4fcc728ea6451d5 |
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 header('X-UA-Compatible: IE=edge,chrome=1'); | |
// or | |
<IfModule mod_headers.c> | |
Header set X-UA-Compatible "IE=Edge,chrome=1" | |
# mod_headers can't match by content-type, but we don't want to send this header on *everything*... | |
<FilesMatch "\.(appcache|crx|css|eot|gif|htc|ico|jpe?g|js|m4a|m4v|manifest|mp4|oex|oga|ogg|ogv|otf|pdf|png|safariextz|svg|svgz|ttf|vcf|webm|webp|woff|xml|xpi)$"> | |
Header unset X-UA-Compatible | |
</FilesMatch> |
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 ie conditional html5 shim to header | |
function add_ie_html5_shim () { | |
global $is_IE; | |
if ($is_IE) | |
echo '<!--[if lt IE 9]>'; | |
echo '<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>'; | |
echo '<![endif]-->'; | |
} | |
add_action('wp_head', 'add_ie_html5_shim'); |
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
define('WP_DEFAULT_THEME', 'theme_folder_name'); |
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
npm install grunt-sass --save-dev | |
// From http://gruntjs.com/getting-started |
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
/* BWP minify - exclude CSS */ | |
add_filter('bwp_minify_style_ignore', 'exclude_my_css'); | |
function exclude_my_css($excluded) { | |
$excluded = array('gforms_css'); | |
return $excluded; | |
} | |
// From http://wordpress.org/support/topic/plugin-better-wordpress-minify-gravity-forms-compatibility |
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_head', function() { | |
echo '<!--[if lt IE 9]><script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->'; | |
} ); | |
//From http://stackoverflow.com/questions/11564142/wordpress-enqueue-scripts-for-only-if-lt-ie-9 |