Skip to content

Instantly share code, notes, and snippets.

<?php
//* Start the engine
include_once( get_template_directory() . '/lib/init.php' );
//* Child theme
define( 'CHILD_THEME_NAME', 'Nominal Theme' );
define( 'CHILD_THEME_URL', 'http://elioverbey.net' );
define( 'CHILD_THEME_VERSION', '1.0' );
//* Enqueue scripts and styles
/*
Theme Name: Nominal Theme
Theme URI: http://elioverbey.net/blog/build-first-genesis-child-theme/
Description: A minimal responsive and HTML5 free theme built for the Genesis Framework.
Author: Eli Overbey
Author URI: http://www.elioverbey.net
Version: 1.0
Template: genesis
@elioverbey
elioverbey / global.js
Created March 18, 2014 21:09
Remove the Shrinking Header Action on the Centric Pro Theme from Genesis
jQuery(function( $ ){
$(".site-header").after('<div class="bumper"></div>');
$(window).scroll(function () {
if ($(document).scrollTop() > 1 ) {
$('.site-header').removeClass('shrink');
} else {
$('.site-header').removeClass('shrink');
}
/* On Line 1049 Change: */
.site-header .wrap {
min-height: 30px;
}
/* On Line 1053 Change: */
.bumper {
min-height: 30px;
}
<?php
//* Do NOT include the opening php tag
//* Display author box on single posts
add_filter( 'get_the_author_genesis_author_box_single', '__return_true' );
//* Modify the size of the Gravatar in the author box
add_filter( 'genesis_author_box_gravatar_size', 'author_box_gravatar_size' );
function author_box_gravatar_size( $size ) {
return '73';
/* Author Box
--------------------------------------------- */
.author-box .avatar {
height: 73px;
width: 73px;
border: 3px solid #fff;
border-radius: 5px;
float: none;
}
<?php
global $post;
$post_id = get_the_ID();
$permalink = get_permalink($post_id);
$title = htmlspecialchars_decode(esc_js(get_the_title()));
$api = gigya_get_option("api_key");
$comments = apply_filters("comments_plugin", "", array(
"post_id" => $post_id,
"permalink" => $permalink,
<?php
add_action( 'wp_enqueue_scripts', 'gigya_global_enqueue' );
function gigya_global_enqueue() {
$ss_url = $_ENV['secrets']['gigya_api_key'];
wp_enqueue_script( 'mysite-scripts', "https://cdns.gigya.com/JS/socialize.js?apiKey=$ss_url", array() );
}
?>
<?php
//* Hook in Gigya Sharebar
add_action( 'genesis_entry_content', 'gigya_share', 9 );
function gigya_share() {
if ( ! is_singular( 'post' ) )
return;
?>
<script type="text/javascript">
var act = new gigya.socialize.UserAction();
// Check if browser can handle SVG
if(!Modernizr.svg){
// Get all img tag of the document and create variables
var i=document.getElementsByTagName("img"),j,y;
// For each img tag
for(j = i.length ; j-- ; ){
y = i[j].src
// If filenames ends with SVG
if( y.match(/svg$/) ){