Skip to content

Instantly share code, notes, and snippets.

Sridhar Katakam srikat

Block or report user

Report or block srikat

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View functions.php
//* Remove the default header
remove_action( 'genesis_header', 'genesis_do_header' );
//* Add custom header
add_action( 'genesis_header', 'sk_do_header' );
function sk_do_header() {
echo '<div class="my-header-image"><a href="http://genesis.dev/"><img src="http://genesis.dev/wp-content/uploads/2014/01/header.jpg" /></a></div>';
genesis_markup( array(
View gist:8702363
//* Enqueue ScrollReveal.js
add_action( 'wp_enqueue_scripts', 'enqueue_scrollreveal' );
function enqueue_scrollreveal() {
wp_enqueue_script( 'scrollreveal', get_stylesheet_directory_uri() . '/js/scrollReveal.min.js', array( 'jquery' ), '', true );
}
View functions.php
add_action( 'genesis_after_header', 'sk_show_banner_below_header' );
function sk_show_banner_below_header() {
echo '<div class="banner-below-header">
<div class="wrap">
<img src="http://genesis.dev/wp-content/uploads/2014/01/header-1140x200.jpg" alt="my banner" />
</div>
</div>';
}
View functions.php
//* Add div.wrap1 and div.wrap2 inside .site-container
add_action( 'genesis_before_header', 'sk_add_wraps_opening_divs', 9 );
function sk_add_wraps_opening_divs() {
echo '<div class="wrap1"><div class="wrap2">';
}
add_action( 'genesis_after_footer', 'sk_add_wraps_closing_divs' );
function sk_add_wraps_closing_divs() {
View jquery.fitvids.init.js
//* Enqueue FitVids
add_action( 'wp_enqueue_scripts', 'enqueue_fitvids' );
function enqueue_fitvids() {
wp_enqueue_script( 'fitvids', get_bloginfo('url') . '/wp-content/js/jquery.fitvids.js', array( 'jquery' ), '', true );
wp_enqueue_script( 'fitvids-init', get_bloginfo('url') . '/wp-content/js/jquery.fitvids.init.js', array( 'fitvids' ), '1.0.0', true );
}
View front-page.php
wp_enqueue_style( 'animate', get_stylesheet_directory_uri() . '/css/animate.min.css' );
// load Waypoints
// Source: http://imakewebthings.com/jquery-waypoints/
wp_enqueue_script( 'waypoints', get_stylesheet_directory_uri() . '/js/waypoints.min.js', array( 'jquery' ), '1.0.0' );
wp_enqueue_script( 'waypoints-init', get_stylesheet_directory_uri() .'/js/waypoints-init.js' , array( 'jquery', 'waypoints' ), '1.0.0' );
@srikat
srikat / functions.php
Created Feb 5, 2014
Adding 'Last updated on: date' to post info in Genesis
View functions.php
//* Add last updated date to the post info in entry header (requires HTML5 theme support)
add_filter( 'genesis_post_info', 'sk_post_info_filter' );
function sk_post_info_filter($post_info) {
if (get_the_modified_time() != get_the_time()) {
$post_info = $post_info . '<br/>Last updated on: ' . the_modified_date('F j, Y', '', '', false);
}
return $post_info;
}
View functions.php
//* Reposition the secondary navigation menu
add_action( 'genesis_meta', 'sk_reposition_subnav' );
function sk_reposition_subnav() {
if( ! is_front_page() )
return;
remove_action( 'genesis_after_header', 'genesis_do_subnav' );
add_action ( 'genesis_before_footer', 'genesis_do_subnav', 1 );
View functions.php
//* Remove the default header
remove_action( 'genesis_header', 'genesis_do_header' );
//* Add custom header
add_action( 'genesis_header', 'sk_do_header' );
function sk_do_header() {
echo '<a href="http://genesis.dev/"><img src="http://genesis.dev/wp-content/uploads/2014/02/500x60.gif" /></a>';
genesis_markup( array(
@srikat
srikat / functions.php
Last active Aug 29, 2015
Changing responsive menu icon from hamburger to a custom one in Genesis. Screenshot: http://i.imgur.com/27i9vFN.png. "content" codes can be obtained from http://melchoyce.github.io/dashicons/.
View functions.php
//* Enqueue Dashicons
add_action( 'wp_enqueue_scripts', 'dashicons' );
function dashicons() {
wp_enqueue_style( 'themename-style', get_stylesheet_uri(), array( 'dashicons' ), '1.0' );
}
You can’t perform that action at this time.