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
var highest = 0; | |
function sortNumber(a,b) { | |
return a - b; | |
} | |
function maxHeight() { | |
var heights = new Array(); | |
$('.fixheight>li').each(function(){ | |
$(this).css('height', 'auto'); | |
heights.push($(this).height()); |
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 | |
// Setup Image data | |
$id = get_field('topbillede'); | |
$size = 'full'; // (thumbnail, medium, large, full or custom size) | |
$image_attributes = wp_get_attachment_image_src( $id, $size ); | |
?> | |
<img src="<?php echo $image_attributes[0]; ?>" width="<?php echo $image_attributes[1]; ?>" height="<?php echo $image_attributes[2]; ?>"> |
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
add_action('after_setup_theme','themename_bw_size'); | |
function themename_bw_size() { | |
add_image_size('themename-bw-image', 100, 100, true); | |
} | |
add_filter('wp_generate_attachment_metadata','themename_bw_filter'); | |
function themename_bw_filter($meta) { | |
$file = wp_upload_dir(); | |
$file = trailingslashit($file['path']).$meta['sizes']['themename-bw-image']['file']; | |
list($orig_w, $orig_h, $orig_type) = @getimagesize($file); |
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 | |
/* | |
Template Name: Isotope Test | |
*/ | |
?> | |
<?php get_header();?> | |
<div class="container"> | |
<div class="row"> |
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
// Block Grid | |
// Technique adapted from Foundation 5 for Bootstrap 3. | |
// https://github.com/zurb/foundation/blob/f755d8704123f86c281ede0b171881e2672f150d/scss/foundation/components/_block-grid.scss | |
// Original LESS Version by Christopher Mitchell (https://gist.github.com/ChrisTM) | |
// Converted to SCSS by Rasmus Jürs (https://github.com/Jursdotme) | |
[class*="block-grid-"] { | |
display: block; | |
margin: -($grid-gutter-width/2); | |
padding: 0; |
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
// Use live database on local installation | |
<?php | |
// paste this in a (new) file, wp-content/db.php | |
add_filter ( 'pre_option_home', 'test_localhosts' ); | |
add_filter ( 'pre_option_siteurl', 'test_localhosts' ); |
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 | |
/* | |
Template Name: Isotope Test | |
*/ | |
?> | |
<?php get_header();?> | |
<div class="container"> | |
<div class="row"> |
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
<ifModule mod_deflate.c> | |
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/css text/javascript application/javascript application/x-javascript image/svg+xml | |
</ifModule> | |
# BEGIN Expire headers | |
<ifModule mod_expires.c> | |
ExpiresActive On | |
ExpiresDefault "access plus 5 seconds" | |
ExpiresByType image/x-icon "access plus 2592000 seconds" | |
ExpiresByType image/jpeg "access plus 2592000 seconds" |
OlderNewer