Skip to content

Instantly share code, notes, and snippets.

View chrismhobson's full-sized avatar

Chris Hobson chrismhobson

View GitHub Profile
@chrismhobson
chrismhobson / 0_reuse_code.js
Last active August 29, 2015 14:17
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@chrismhobson
chrismhobson / hbc_functions.php
Last active August 29, 2015 14:15
Genesis - Add Full-width Responsive Header Images to Pages
//* Add Responsive Header Images to Pages
add_image_size( 'header-img', 9999, 250, TRUE ); /*remove '250' and true for unlimited height*/
add_action('genesis_after_header', 'site_banner', 25);
function site_banner(){
if( !is_singular('page') )
return;
if( has_post_thumbnail() && is_page() ) :
$ftbanner = wp_get_attachment_image_src( get_post_thumbnail_id( get_the_ID() ), 'header-img' );
$banner = $ftbanner[0];