Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* Custom HTML5 Functions File
* @author Stewart Chamberlain
* @link http://stewartchamberlain.com/tutorials/convert-genesis-child-theme-to-html5/
*/
/**
* ENQUEUE MODERNIZR (http://modernizr.com/) TO HELP WITH OLDER BROWSER SUPPORT.
*/
<?php
/**
* Include HTML5 Functions File
* @author Stewart Chamberlain
* @link http://stewartchamberlain.com/tutorials/convert-genesis-child-theme-to-html5/
*/
include_once ( get_stylesheet_directory() . '/lib/functions/html5.php' );
<?php
/**
* HTML5 Primary Sidebar
* @author Stewart Chamberlain
* @link http://stewartchamberlain.com/tutorials/convert-genesis-child-theme-to-html5/
*/
?>
<aside id="sidebar" class="sidebar widget-area">
<?php
genesis_structural_wrap( 'sidebar' );
<?php
/**
* HTML5 Secondary Sidebar
* @author Stewart Chamberlain
* @link http://stewartchamberlain.com/tutorials/convert-genesis-child-theme-to-html5/
*/
?>
<aside id="sidebar-alt" class="sidebar widget-area">
<?php
genesis_structural_wrap( 'sidebar-alt' );
@StewartChamberlain
StewartChamberlain / 3d.css
Last active December 17, 2015 08:08
Css text-shadow Tutorial
h1.three-d {
color: rgb(255, 255, 255);
text-shadow: 0px 1px 0px rgba(153, 153, 153, 0.6),
0px 2px 0px rgba(136, 136, 136, 0.6),
0px 3px 0px rgba(119, 119, 119, 0.6),
0px 4px 0px rgba(102, 102, 102, 0.6),
0px 5px 0px rgba(85, 85, 85, 0.6),
0px 6px 0px rgba(68, 68, 68, 0.7),
0px 7px 0px rgba(51, 51, 51, 0.8),
0px 8px 7px rgba(0, 17, 53, 0.9);
<?php
// Turn On HTML5 Markup
add_theme_support( 'html5' );
<?php
/** Do NOT include the opening php tag */
/** Add post navigation (requires HTML5 support) */
add_action( 'genesis_after_entry_content', 'genesis_prev_next_post_nav', 5 );
@StewartChamberlain
StewartChamberlain / jquery-google-cdn.php
Created May 28, 2013 15:26
Wordpress Enqueue Jquery From Google CDN
<?php
// Enqueue jQuery from Google CDN. Uses the currently registered WordPress jQuery version.
function google_jquery_enqueue() {
// Probably not necessary if called with the 'wp_enqueue_scripts' action.
if (is_admin()) return;
global $wp_scripts;
// Change this flag to have the CDN script triggered by wp_footer instead of wp_head.
$cdn_script_in_footer = false;
<?php
add_action( 'genesis_before_content', 'sc_tag_message' );
function sc_tag_message() {
if ( is_tag() ) {
$current_tag = single_tag_title("", false);
$message = '<div class="tag-message">';
$message .= '<h3> Please click on the blog on '. $current_tag .' below</h3>';
$message .= '</div>';
echo $message;
<?php
function sc_bottom_overlay() {
$button_text = 'Purchase'; // Button Text
$link_uri = 'http://YOUR_LINK_HERE'; // Url for button Link
$overlay = '<div class="overlay"><span style="opacity:1;"><a class="overlay-button" href="'. $link_uri .'">'. $button_text .'</a></span></div>';
echo $overlay;
}
add_action( 'genesis_after_footer', 'sc_bottom_overlay' );