Skip to content

Instantly share code, notes, and snippets.

@simplethemes
simplethemes / gist:5036890
Created February 26, 2013 08:13
Pricing Page Example Markup
<h1 class="center remove-bottom">Feature Product Pricing Table</h1>
<h3 class="center remove-top">Example Demo with Options</h3>
[break]
[one_third]
[callout style="white" align="center" centertitle="true" title="Product One"]
<ul class="check nopad">
<li class="yes">Item One</li>
<li class="yes">Item Two</li>
<li class="no">Item Three</li>
<li class="no">Item Four</li>
@simplethemes
simplethemes / gist:5234822
Last active December 15, 2015 08:59
Child Theme functions for adding additional fonts to Theme Options
// Defines the font stacks displayed in Theme Options
function my_theme_fonts() {
$default = array(
'opensans' => 'Open Sans',
'helvetica' => 'Helvetica',
'arial' => 'Arial',
'tahoma' => 'Tahoma',
'georgia' => 'Georgia',
'cambria' => 'Cambria',
@simplethemes
simplethemes / Guardfile
Created March 31, 2013 03:03
Guardfile for Sass + Compass + Livereload
# Guardfile
# More info at https://github.com/guard/guard#readme
guard 'livereload' do
watch(%r{.+\.(css|html)$})
end
guard 'sass',
:input => 'sass',
:output => 'css',
@simplethemes
simplethemes / gist:5436978
Created April 22, 2013 17:35
Skeleton Grid (1600px)
/* Table of Contents
==================================================
#Base 960 Grid
#Tablet (Portrait)
#Mobile (Portrait)
#Mobile (Landscape)
#Clearing */
.full-width {width:960px; height:auto; overflow:hidden}
#teaser.normal {width: 960px;}
@simplethemes
simplethemes / functions.php
Last active December 17, 2015 11:39
Function to count Widgets in a given location and append the column classes to each.
/* Split Individual Widgets into Columns */
function st_split_widgets($sidebar_position) {
if ( is_active_sidebar( $sidebar_position )) {
// count the active widgets to determine column sizes
$the_widgets = wp_get_sidebars_widgets();
$below_content_sidebars = $the_widgets[$sidebar_position];
$number = count($below_content_sidebars);
@simplethemes
simplethemes / functions.php
Last active December 18, 2015 11:58
Add google fonts to theme options
<?php
// Defines the font stacks displayed in Theme Options
function st_custom_theme_fonts() {
$default = array(
'lato' => 'Lato',
'helvetica' => 'Helvetica',
'arial' => 'Arial',
'tahoma' => 'Tahoma',
'georgia' => 'Georgia',
@simplethemes
simplethemes / SassMeister-input-HTML.html
Created November 13, 2013 15:50
Generated by SassMeister.com.
<h4>Preview:</h4>
<div class="st-callout hastitle lightred">
<div class="inside">
<h4 class="st-callout-title">Callout Title</h4>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
<a href="#">Link</a>
</div>
</div>
@simplethemes
simplethemes / youtube-url.php
Created November 21, 2013 23:00
Extracts YouTube video ID from various URL structures
<?php
$url = array (
'http://youtu.be/dQw4w9WgXcA',
'http://www.youtube.com/embed/dQw4w9WgXcB',
'http://www.youtube.com/watch?v=dQw4w9WgXcC',
'http://www.youtube.com/?v=dQw4w9WgXcD',
'http://www.youtube.com/v/dQw4w9WgXcE',
'http://www.youtube.com/e/dQw4w9WgXcF',
'http://www.youtube.com/user/username#p/u/11/dQw4w9WgXcG',
@simplethemes
simplethemes / SassMeister-input-HTML.html
Created December 10, 2013 07:39
Generated by SassMeister.com.
<!doctype html>
<!--[if lt IE 7 ]><html class="ie ie6" lang="en-US"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="en-US"> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="en-US"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--><html lang="en-US"> <!--<![endif]-->
<head>
<meta charset="UTF-8" />
<title>Mobius WordPress Theme | Just another WordPress site</title>
@simplethemes
simplethemes / latest-shortcode
Created June 27, 2014 20:12
Latest Shortcode Parameters
/*-----------------------------------------------------------------------------------*/
//
// Latest Posts
// Shortcode Parameters:
//
/*-----------------------------------------------------------------------------------*/
// excerpt="true|false" ------ display the excerpt or 'more' tag break
// length="50" ------ excerpt word length
// thumbs="true|false" ------ display featured thumbnail
// width="50" ------ featured thumbnail width