Skip to content

Instantly share code, notes, and snippets.

View haveboard's full-sized avatar

haveboard haveboard

View GitHub Profile
<?php
if ( ! class_exists( 'Custom_Post_Template' ) ) {
class Custom_Post_Template {
const POST_TYPE = 'post'; // what ppst type would you like to make this template for
public function __construct() {
add_action( 'init', array( &$this, 'init' ) );
@haveboard
haveboard / Responsive Bookmarklet code Multi-frame
Created April 4, 2013 17:03
A responsive bookmarklet for testing. I apologize that I don't remember where I found this to give credit to original offer. Definitely a handy tool though.
javascript:document.write('<!DOCTYPE html><html><head><meta charset="utf-8"><title>Responsive Design Testing</title><style>body %7B margin: 20px; font-family: sans-serif; overflow-x: scroll; %7D.wrapper %7B width: 6000px; %7D.frame %7B float: left; %7Dh2 %7B margin: 0 0 5px 0; %7Diframe %7B margin: 0 20px 20px 0; border: 1px solid %23666; %7D</style></head><body><div class="wrapper"><div class="frame"><h2>240<span> x 320</span> <small>(mobile)</small></h2><iframe src="' + window.location + '" sandbox="allow-same-origin allow-forms" seamless width="240" height="320"></iframe></div><div class="frame"><h2>320<span> x 480</span> <small>(mobile)</small></h2><iframe src="' + window.location + '" sandbox="allow-same-origin allow-forms" seamless width="320" height="480"></iframe></div><div class="frame"><h2>480<span> x 640</span> <small>(small tablet)</small></h2><iframe src="' + window.location + '" sandbox="allow-same-origin allow-forms" seamless width="480" height="640"></iframe></div><div class="frame"><h2>768<sp