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
// Removes tabs from their original loaction | |
remove_action( 'HOOK NAME', 'FUNCTION NAME', 10 ); | |
// Inserts tabs under the main right product content | |
add_action( 'HOOK NAME', 'FUNCTION NAME', 60 ); |
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
$(document).ready(function(){ | |
$('iframe[src*="youtube"]').wrap( "<div class='thing-with-video'></div>" ); | |
$('iframe[src*="vimeo"]').wrap( "<div class='thing-with-video'></div>" ); | |
// Target your .container, .wrapper, .post, etc. | |
$(".thing-with-video").fitVids(); | |
}); |
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 | |
$json_url = "http://api.randomuser.me/?format=json&results=10"; | |
$json = file_get_contents($json_url); | |
$links = json_decode($json, TRUE); | |
foreach($links['results'] as $key=>$val ){ | |
$user_image_large = $val['user']['picture']['large']; | |
$user_image_medium = $val['user']['picture']['medium']; | |
$user_image_thumbnail = $val['user']['picture']['thumbnail']; | |
$user_firstname = ucfirst($val['user']['name']['first']); | |
$user_lastname = ucfirst($val['user']['name']['last']); |
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 function my_acf_relationship_result( $html, $post ) | |
{ | |
// add an image to each result | |
$field = get_field('varenummer', $post->ID); | |
if( $field ) | |
{ | |
$html = '<strong>' . $field . '</strong> - ' . $html; | |
} |
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html> | |
<head> | |
<title></title> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<style type="text/css"> | |
@import url(https://fonts.googleapis.com/css?family=Roboto:400,400italic,700,700italic); | |
body { | |
margin: 0; | |
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
<?php function slugify($text) | |
{ | |
// replace non letter or digits by - | |
$text = preg_replace('~[^\\pL\d]+~u', '-', $text); | |
// trim | |
$text = trim($text, '-'); | |
// transliterate | |
$text = iconv('utf-8', 'us-ascii//TRANSLIT', $text); |
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" |
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"> |