This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* | |
* Template Name: Blog | |
* | |
* Modified Blog page template to add content area above | |
* blog archives | |
* | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// don't copy openting php tag | |
// Add odd/even classes to blog archives | |
add_filter ( 'post_class' , 'wsm_oddeven_post_class' ); | |
global $current_class; | |
$current_class = 'odd'; | |
function wsm_oddeven_post_class ( $classes ) { | |
global $current_class; | |
$classes[] = $current_class; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Don't copy opening php tag | |
// Move featured image above post title in Genesis 2.0+ (HTML5) | |
remove_action( 'genesis_entry_content', 'genesis_do_post_image', 8 ); | |
add_action( 'genesis_entry_header', 'genesis_do_post_image', 8 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Structural | |
--------------------------------------------- */ | |
#wrap .site-container | |
#inner .site-inner | |
#content-sidebar-wrap .content-sidebar-wrap | |
#content .content | |
/* Header | |
--------------------------------------------- */ | |
#header .site-header |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Do not copy opening php tag | |
// Force Stupid IE to NOT use compatibility mode | |
add_filter( 'wp_headers', 'wsm_keep_ie_modern' ); | |
function wsm_keep_ie_modern( $headers ) { | |
if ( isset( $_SERVER['HTTP_USER_AGENT'] ) && ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE' ) !== false ) ) { | |
$headers['X-UA-Compatible'] = 'IE=edge,chrome=1'; | |
} | |
return $headers; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(document).ready(function() { | |
jQuery.fn.cleardefault = function() { | |
return this.focus(function() { | |
if( this.value == this.defaultValue ) { | |
this.value = ""; | |
} | |
}).blur(function() { | |
if( !this.value.length ) { | |
this.value = this.defaultValue; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Don't copy the opening php tag above | |
add_filter( 'genesis_author_box', 'wsm_author_box_pattern' ); | |
function wsm_author_box_pattern( $pattern ) { | |
$gravatar = get_avatar(get_the_author_id() , 80); | |
$author = get_the_author_meta( 'display_name' ); | |
$description = get_the_author_meta( 'description' ); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
.morelink { | |
bottom: -13px; | |
left: -10px; | |
line-height: 1; | |
position: absolute; | |
} | |
.morelink a:before { | |
background: url(triangle-background-image.png) no-repeat 0 0; |