View index.html
1 2 3
<div class="video-wrapper">
<iframe src="//www.youtube.com/embed/bVKCHZqax84" frameborder="0" allowfullscreen></iframe>
</div>
View SassMeister-input.scss
1 2 3 4 5 6 7 8 9 10
// ----
// Sass (v3.4.4)
// Compass (v1.0.1)
// ----
 
// Set fix-mqs to the em width media queries should output at
$fix-mqs:false;
 
// Set map of breakpoints
$breakpoints: (
View inline-css-wordpress.php
1 2 3 4 5 6 7 8 9 10
/**
* Read the contents of the theme CSS file into a variable and ouput.
**/
function ajo_inline_styles() {
$css_file = get_stylesheet_uri(); // This will load the entire theme stylesheet in the head (only recommended if it's small)
// to include specific CSS use: `get_template_directory_uri() . '/path-to-above-the-fold.css'
$css = file_get_contents($css_file);
echo "<style>{$css}</style>";
View SassMeister-input.scss
1 2 3 4 5 6 7 8 9 10
// ----
// Sass (v3.4.1)
// Compass (v1.0.1)
// ----
 
.selector {
width:100px;
height:100px;
.child-selector {
View Switch wrapper example
1 2 3 4 5 6 7 8 9 10
<?php
 
// In a file somewhere that you include (functions etc)
function switch_wrapper( $clause )
{
switch ($clause)
{
case 'foo':
echo "Foo was here!";
break;
View WordPress find current post type
1 2 3 4 5 6 7 8 9 10
/**
* Work out the current post type
* - based on WP function or current taxonomy
* @author Adam Onishi (aonishi@wearearchitect.com)
*/
function dig_current_post_type() {
global $post;
 
if( ! is_tag() ) {
$type_name = get_post_type();
View WordPress create post type class function
1 2 3 4 5 6 7 8 9 10
/**
* Post type class function
* @author Adam Onishi <aonishi@wearearchitect.com>
*/
function dig_get_post_type_class( $type = false ) {
if( ! $type ) {
$type = dig_current_post_type();
}
 
$class = str_replace('dig_', '', $type);
View WordPress useful classes function
1 2 3 4 5 6 7 8 9
/**
* Include useful classes in body_class and post_class
*/
function dig_add_useful_classes($classes) {
global $post;
if( ! is_tag() ) {
$classes[] = dig_get_post_type_class();
}
View rem-mixin.scss
1 2 3 4 5 6 7 8 9 10
// Rems with pixel fallback for any property
// @author @BPScott (https://github.com/BPScott/bpscott.github.io/blob/develop/source/stylesheets/vendor/_rem.scss)
@mixin rem($property, $px-values, $baseline-px: $base-font-size) {
// Convert the baseline into rems
$baseline-rem: $baseline-px / 1rem;
 
// Create an empty list that we can dump values into
$rem-values: ();
@each $value in $px-values {
// If the value is zero, return 0
Something went wrong with that request. Please try again.