Skip to content

Instantly share code, notes, and snippets.

View ashby's full-sized avatar

Ashby Utting ashby

View GitHub Profile
@ashby
ashby / gist:11439611
Created April 30, 2014 21:57
CSS: Browser Reset
padding:0 8px;
margin:0;
color:gray;
background:transparent;
resize: none;
font-size:12px;
height: auto;
-webkit-appearance: none;
border-radius:0px;
-webkit-border-radius:0px;
@ashby
ashby / gist:11440314
Last active August 29, 2015 14:00
CSS: Box Sizing
box-sizing:border-box;
-moz-box-sizing:border-box;
@ashby
ashby / gist:11442085
Created May 1, 2014 00:30
WP: Custom Post Type
add_action( 'init', 'register_my_cpt' );
function register_my_cpt() {
$labels = array(
'name' => _x( 'Custom', 'my_cpt' ),
'singular_name' => _x( 'Custom', 'my_cpt' ),
'add_new' => _x( 'Add New', 'my_cpt' ),
'add_new_item' => _x( 'Add New Custom', 'my_cpt' ),
'edit_item' => _x( 'Edit Custom', 'my_cpt' ),
@ashby
ashby / gist:11442127
Created May 1, 2014 00:33
WP: Custom Taxonomy
function my_custom_taxonomy() {
$labels = array(
'name' => _x( 'Custom', 'Taxonomy General Name', 'kk_theme' ),
'singular_name' => _x( 'Customs', 'Taxonomy Singular Name', 'kk_theme' ),
'menu_name' => __( 'Customs', 'kk_theme' ),
'all_items' => __( 'All Customs', 'kk_theme' ),
'parent_item' => __( 'Parent Custom', 'kk_theme' ),
'parent_item_colon' => __( 'Parent Custom:', 'kk_theme' ),
'new_item_name' => __( 'New Custom Name', 'kk_theme' ),
'add_new_item' => __( 'Add New Custom', 'kk_theme' ),
@ashby
ashby / gist:11442187
Created May 1, 2014 00:37
WP: Add Image Size
add_theme_support( 'post-thumbnails' );
add_image_size( 'thumb', 100, 100, true );
@ashby
ashby / gist:11442218
Created May 1, 2014 00:39
JS: WP AJAX
var $j = jQuery.noConflict();
$j(document).ready(function() {
$j('#load-more').on('click', function(e){
var $this = $j(this);
e.preventDefault();
$j('#results-message').css('display', 'block');
post_number = $this.data('post-number');
@ashby
ashby / gist:11442283
Created May 1, 2014 00:43
PHP: WP AJAX
function get_more_posts(){
$main_args = array(
'post_type' =>'post',
'post_status' => 'publish',
'posts_per_page' => $_POST['post_number'],
'paged' => $_POST['pag']
);
$main_posts = new WP_Query($main_args);
@ashby
ashby / gist:11442328
Created May 1, 2014 00:47
SS: Standard
@charset "UTF-8";
@font-face {
font-family: "SSStandard";
src: url('ss-standard.eot');
src: url('ss-standard.eot?#iefix') format('embedded-opentype'),
url('ss-standard.woff') format('woff'),
url('ss-standard.ttf') format('truetype'),
url('ss-standard.svg#SSStandard') format('svg');
font-weight: normal;
font-style: normal;
@ashby
ashby / gist:11442336
Created May 1, 2014 00:48
SS: Social Circle
@charset "UTF-8";
@font-face {
font-family: "SSSocialCircle";
src: url('ss-social-circle.eot');
src: url('ss-social-circle.eot?#iefix') format('embedded-opentype'),
url('ss-social-circle.woff') format('woff'),
url('ss-social-circle.ttf') format('truetype'),
url('ss-social-circle.svg#SSSocialCircle') format('svg');
font-weight: normal;
font-style: normal;
@ashby
ashby / SS: Geomicons Squared
Last active August 29, 2015 14:00
SS: Geomicons Squared
@font-face {
font-family: "SSGeomiconsSquared";
src: url('ss-geomicons-squared.eot');
src: url('ss-geomicons-squared.eot?#iefix') format('embedded-opentype'),
url('ss-geomicons-squared.woff') format('woff'),
url('ss-geomicons-squared.ttf') format('truetype'),
url('ss-geomicons-squared.svg#SSGeomiconsSquared') format('svg');
font-weight: 400;
font-style: normal;
}