Skip to content

Instantly share code, notes, and snippets.

<html>
<head>
<title>BP</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
</head>
<body>
<script type="text/javascript">
function render_tweet_text( data ) {
if( typeof data.tweets != undefined ) {
document.write( data.tweets[0].text );
@micahwave
micahwave / gist:3085636
Created July 10, 2012 19:19
ad resize parent frame
// resize the sidebar iframe when a new ad gets loaded
function time_resize_iframe(id, w, h) {
if( jQuery(id).length ) {
jQuery(id).attr('width', w).attr('height', h);
}
}
@micahwave
micahwave / gist:3085585
Created July 10, 2012 19:12
iframe ad
<html>
<head>
<title>adFactory</title>
<script type="text/javascript" src="http://img.timeinc.net/shared/static/js/tii_ads.js"></script>
</head>
<style type="text/css">
body * {
margin: auto;
}
</style>
@micahwave
micahwave / gist:3078566
Created July 9, 2012 20:02
Some landing markup
<section class="triple">
<h2 class="section-title">Latest and Greatest2</h2>
<div class="row"> <div class="tout">
<a href="http://micahland.com/tout/bat-pod/"><figure class="entry-thumb entry-thumb-m "><img src="http://micahland.com/wp-content/uploads/2012/06/Bat-pod-767743-460x307.jpg" class="full-width wp-post-image" alt="Bat-pod-767743" title="Bat-pod-767743" /></figure></a> <h3> <a href="http://micahland.com/tout/bat-pod/" title="Permalink to Bat&nbsp;Pod" rel="bookmark">Bat&nbsp;Pod</a>
</h3>
<div class="entry-content"><p>It has been eight years since Batman vanished into the night, turning, in that instant, from hero to fugitive. </p>
</div>
</div>
<div class="tout">
<a href="http://micahland.com/tout/the-bat/"><figure class="entry-thumb entry-thumb-m "><img src="http://micahland.com/wp-content/uploads/2012/06/tdkrbtwngpic-460x307.jpg" class="full-width wp-post-image" alt="tdkrbtwngpic" title="tdkrbtwngpic" /></figure></a> <h3> <a href="
@micahwave
micahwave / gist:3035095
Created July 2, 2012 19:20
rewrite rules
// make it so we can use /photo/x/ with galleries
function time_rewrite_rules() {
global $wp_rewrite;
add_rewrite_tag( '%photo%', '([^&]+)' );
add_rewrite_tag( '%slide%', '([^&]+)' );
add_rewrite_tag( '%tab%', '([^&]+)' );
add_rewrite_endpoint('photo', EP_PERMALINK);
add_rewrite_endpoint('video', EP_PERMALINK);
add_rewrite_endpoint('slide', EP_PERMALINK);
@micahwave
micahwave / gist:2990072
Created June 25, 2012 17:38
fb subscribe
<div class="subscribe">
<div class="fb-subscribe" data-href="<?php echo esc_url( $fb ); ?>" data-layout="button_count" data-show-faces="false" data-width="75"></div>
Subscribe to <?php the_author(); ?> on Facebook
</div>
<div class="google-ad">
<span class="sponsored"><a href="">Sponsored Links</a></span>
<p>
<a class="ad-title" href="">Mitt Romney Official Site</a><br>
<span class="ad-desc">Support a Smaller, Smarter, Simpler Government? Donate $5 Now!</span><br>
<a class="ad-url" href="">www.Victory.MittRomney.com</a>
</p>
@micahwave
micahwave / gist:2961583
Created June 20, 2012 19:01
Package markup
<div class="time-gallery package">
<div class="nav">
<a href="#" class="disabled arrow prev">prev</a>
<div style="float:left">
<div class="count" style="float:none;">
<span class="position">1</span>
@micahwave
micahwave / gist:2948501
Created June 18, 2012 13:58
WP-Paginate markup
<ol class="wp-paginate">
<li><span class="title"></span></li>
<li><span class="page current">1</span></li>
<li><a href="http://micahland.com/page/2/" title="2" class="page">2</a></li>
<li><a href="http://micahland.com/page/3/" title="3" class="page">3</a></li>
<li><a href="http://micahland.com/page/4/" title="4" class="page">4</a></li>
<li><a href="http://micahland.com/page/5/" title="5" class="page">5</a></li>
<li><span class="gap">...</span></li>
<li><a href="http://micahland.com/page/8/" title="8" class="page">8</a></li>
<li><a href="http://micahland.com/page/2/" class="next">Next</a></li>
<article id="article-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<h3 class="entry-category">Category</h3>
<h1 class="entry-title">Article Title</h1>
<div class="entry-meta">
<span class="entry-byline">By Author</span>
<span class="entry-data">Date</span>