Skip to content

Instantly share code, notes, and snippets.

@About2git
About2git / backstretch-set.js
Last active August 29, 2015 14:15 — forked from srikat/backstretch-set.js
Applying Backstretch to multiple Featured images in Genesis
jQuery(function( $ ){
$( ".content .featured-image" ).each(function() {
var featured_image = $(this).data( "featuredimage" );
$(this).backstretch([BackStretchImg]=featured_image,{duration:3000,fade:750});
});
});
@About2git
About2git / functions.php
Last active August 29, 2015 14:15 — forked from srikat/functions.php
Alternate border colors for Posts in WordPress
//* Add even/odd post class for Posts in Posts page, Archives and Search results
add_filter( 'post_class', 'sk_even_odd_post_class' );
function sk_even_odd_post_class( $classes ) {
global $wp_query;
if ( is_home() || is_archive() || is_search() ) {
$classes[] = ($wp_query->current_post % 2 == 0) ? 'odd' : 'even';
}
@About2git
About2git / CSScomb.sublime-settings
Last active August 29, 2015 14:15 — forked from srikat/CSScomb.sublime-settings
Sublime Text CSScomb user settings file for formatting CSS per WordPress coding standards
{
"config": {
"exclude": [
".git/**",
"node_modules/**"
],
"verbose": true,
"always-semicolon": true,
"block-indent": "\t",
@About2git
About2git / functions.php
Created February 13, 2015 21:24 — forked from srikat/functions.php
How to use Genesis Grid Loop plugin on a specific Category and show Excerpts
/**
* Grid Loop on 'Category 1' category archive
* Customized by Sridhar Katakam
*
* @author Bill Erickson
* @link https://github.com/billerickson/Genesis-Grid/wiki/Home
*
* @param bool $grid, whether to use grid loop
* @param object $query, the WP Query
* @return bool
@About2git
About2git / functions.php
Created February 13, 2015 21:25 — forked from srikat/functions.php
Revealing Featured Images when hovering on Posts in Whitespace Pro
add_image_size( 'home-image', 400, 400, true );
@About2git
About2git / functions.php
Last active August 29, 2015 14:15 — forked from srikat/functions.php
Horizontal Opt-in Form in Genesis using eNews Extended plugin
//* Register Horizontal Opt-In widget area
genesis_register_sidebar(
array(
'id' => 'horizontal-opt-in',
'name' => __( 'Horizontal Opt-In' ),
'description' => __( 'This is the widget area for horizontal opt-in form.' ),
) );
//* Display Horizontal Opt-In below Header
add_action( 'genesis_after_header', 'sk_horizontal_opt_in' );
@About2git
About2git / gist:33cb80220cc980eba064
Created February 13, 2015 21:25 — forked from srikat/gist:76411bebd4e09d9fe92e
CSS Injection and Auto Refresh using BrowserSync
npm install -g browser-sync
@About2git
About2git / functions.php
Last active August 29, 2015 14:15 — forked from srikat/functions.php
How to customize Entry Meta conditionally in Genesis
<?php
//* Do NOT include the opening php tag
add_filter( 'genesis_post_meta', 'sk_post_meta_filter' );
/**
* Customize entry meta in entry footer
*
* Context: Archive page and Singular pages of 'books' CPT.
*
* @author Sridhar Katakam
@About2git
About2git / functions.php
Last active August 29, 2015 14:15 — forked from srikat/functions.php
Setting the number of posts on Posts page for handhelds in Genesis.
<?php
//* Do NOT include the opening php tag
add_action( 'pre_get_posts', 'sk_change_posts_per_page' );
/**
* Set Posts Per Page on Handhelds (Tablets and Mobiles)
*
* Context: Posts page
*
* @author Sridhar Katakam
@About2git
About2git / content.html
Last active August 29, 2015 14:15 — forked from srikat/content.html
How to use iCheck for customized check boxes and radio buttons in WordPress
<ul class="list">
<li><label><input type="checkbox" name="step1" value="Step 1"><span>Step 1</span></label></li>
<li><label><input type="checkbox" name="step2" value="Step 2"><span>Step 2</span></label></li>
</ul>