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
@srikat
srikat / functions.php
Last active Dec 24, 2015
Code to add in Sixteen Nine Pro's functions.php to add a Home Featured widget area above posts on homepage. http://sridharkatakam.com/add-home-featured-section-posts-homepage-sixteen-nine-pro/
View functions.php
<?php
//* Do NOT include the opening php tag
genesis_register_sidebar( array(
'id' => 'home-featured',
'name' => __( 'Home Featured', 'sixteen-nine' ),
'description' => __( 'This is the home featured section.', 'sixteen-nine' ),
) );
/** Add the home featured section */
@srikat
srikat / functions.php
Created Oct 6, 2013
Code to add in Genesis child theme, eleven40 Pro to add a Home Featured widget area above posts on homepage. Based on http://www.briangardner.com/home-widget-area-eleven40/
View functions.php
<?php
//* Do NOT include the opening php tag
genesis_register_sidebar( array(
'id' => 'home-featured',
'name' => __( 'Home Featured', 'eleven40' ),
'description' => __( 'This is the home featured section.', 'eleven40' ),
) );
/** Add the home featured section */
@srikat
srikat / functions.php
Last active Dec 24, 2015
Metro Pro: How to make a 560 x 150 logo (uploaded as Header) responsive with a search widget in 'Header Right' widget area. http://sridharkatakam.com/adding-responsive-logo-metro-pro/
View functions.php
<?php
//* Do NOT include the opening php tag
//* Add support for custom header
add_theme_support( 'custom-header', array(
// 'width' => 270,
// 'height' => 80,
'width' => 560,
'height' => 150,
'header-selector' => '.site-title a',
@srikat
srikat / front-page.php
Created Oct 9, 2013
To make home featured widgets in Minimum Pro appear site-wide, delete the code provided in first box from front-page.php and add the code provided in the second box in functions.php
View front-page.php
if ( is_active_sidebar( 'home-featured-1' ) || is_active_sidebar( 'home-featured-2' ) || is_active_sidebar( 'home-featured-3' ) || is_active_sidebar( 'home-featured-4' ) ) {
//* Add Home featured Widget areas
add_action( 'genesis_before_content_sidebar_wrap', 'minimum_home_featured', 15 );
}
@srikat
srikat / gist:6897105
Created Oct 9, 2013
How to replace site tagline in .site-tagline-left with a widgeted area in Minimum Pro
View gist:6897105
In functions.php, replace
printf( '<p %s>%s</p>', genesis_attr( 'site-description' ), esc_html( get_bloginfo( 'description' ) ) );
with
genesis_widget_area( 'site-tagline-left' );
and add
@srikat
srikat / functions.php
Last active Dec 25, 2015
To add a widgeted area below header or subnav (if present) in Genesis child theme, Blissful. Don't forget to go to Appearance -> Widgets and place your desired content via a widget in the "Leaderboard Ad" sidebar.
View functions.php
<?php
//* Do NOT include the opening php tag
genesis_register_sidebar( array(
'id' => 'leaderboard-ad',
'name' => __( 'Leaderboard Ad', 'blissful' ),
'description' => __( 'This is below header section.', 'blissful' ),
) );
add_action( 'genesis_after_header', 'sk_add_widget_area_below_header', 9 );
@srikat
srikat / functions.php
Last active Oct 14, 2017
Force excerpts in Search results page regardless of Content Archives themes settings in Genesis
View functions.php
add_action( 'genesis_before_loop', 'sk_excerpts_search_page' );
function sk_excerpts_search_page() {
if ( is_search() ) {
add_filter( 'genesis_pre_get_option_content_archive', 'sk_show_excerpts' );
}
}
function sk_show_excerpts() {
return 'excerpts';
}
View functions.php
<?php
//* Do NOT include the opening php tag
//* Add support for structural wraps
add_theme_support( 'genesis-structural-wraps', array(
'header',
'site-tagline',
'nav',
'subnav',
'home-featured',
@srikat
srikat / functions.php
Created Oct 14, 2013
To incorporate Minimum Pro’s Home Featured Widget Areas in eleven40 Pro. We are restricting the code to homepage and a couple of selected Pages (IDs 2 and 83).
View functions.php
<?php
//* Start the engine
include_once( get_template_directory() . '/lib/init.php' );
//* Set Localization (do not remove)
load_child_theme_textdomain( 'eleven40', apply_filters( 'child_theme_textdomain', get_stylesheet_directory() . '/languages', 'eleven40' ) );
//* Child theme (do not remove)
define( 'CHILD_THEME_NAME', __( 'eleven40 Pro Theme', 'eleven40' ) );
define( 'CHILD_THEME_URL', 'http://my.studiopress.com/themes/eleven40/' );
@srikat
srikat / functions.php
Created Oct 19, 2013
Split footer in Genesis
View functions.php
add_shortcode( 'sitename', 'site_name' );
function site_name() {
return '<a href="' . get_bloginfo( 'url' ) . '" title="' . get_bloginfo( 'sitename' ) . '">' . get_bloginfo( 'name' ) . '</a>';
}
//* Change the footer text
add_filter('genesis_footer_creds_text', 'sp_footer_creds_filter');
function sp_footer_creds_filter( $creds ) {
$creds = '
You can’t perform that action at this time.