Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View srikat's full-sized avatar

Sridhar Katakam srikat

View GitHub Profile
@srikat
srikat / accordion.js
Last active August 29, 2015 13:56
Linking to a panel when using jQuery UI Accordion in WordPress. http://sridharkatakam.com/link-accordion-panel-using-jquery-ui-accordion-wordpress/
jQuery(document).ready(function($) {
var defaultPanel = parseInt(getParam('panel'));
$( "#accordion1" ).accordion({
active: defaultPanel,
header: '> div.my-accordion-section > h3',
heightStyle: 'content'
});
function getParam(name) {
@srikat
srikat / functions.php
Last active August 29, 2015 13:56
Moving Post info near Post meta in Genesis. Screenshot of single Post: http://i.imgur.com/yAEVarR.jpg
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
add_action( 'genesis_entry_footer', 'genesis_post_info', 9 );
//* Customize the entry meta in the entry header (requires HTML5 theme support)
add_filter( 'genesis_post_info', 'sp_post_info_filter' );
function sp_post_info_filter($post_info) {
$post_info = '[post_date] by [post_author_posts_link] [post_edit]';
return $post_info;
@srikat
srikat / functions.php
Created February 9, 2014 12:32
Making Home Bottom images circular with zoom on hover in Outreach Pro.
add_image_size( 'home-bottom', 200, 200, TRUE );
@srikat
srikat / functions.php
Last active August 29, 2015 13:56
Adding current date to the right of Header menu in Agency Pro. http://sridharkatakam.com/add-current-date-right-header-menu-agency-pro/
add_filter('widget_text', 'do_shortcode');
add_shortcode('today_date', 'get_today_date');
function get_today_date($atts) {
// return date('F j, Y');
return date_i18n( get_option( 'date_format' ) );
}
@srikat
srikat / gist:8931730
Created February 11, 2014 09:26
http://i.imgur.com/2tdL6Wm.png. To add code after "ul" in "nav-header" when using Gary's Genesis Header Nav plugin, https://github.com/GaryJones/genesis-header-nav. Background: https://twitter.com/chillybindesign/status/433087869771460608
In class-genesis-header-nav.php
above
$nav_output = $nav_markup_open . $nav . $nav_markup_close;
add
$nav = $nav . '<div class="menu-header-right"><i class="fa fa-phone"></i></div>';
@srikat
srikat / functions.php
Last active August 29, 2015 13:56
Show a specific custom menu below existing content in Footer. http://sridharkatakam.com/adding-custom-menu-footer-genesis/
//* Show custom menu in Footer
add_action( 'genesis_footer', 'sk_custom_menu_in_footer' );
function sk_custom_menu_in_footer() {
$class = 'menu genesis-nav-menu menu-footer';
$args = array(
'menu' => 'Footer Menu', // Enter name of your custom menu here
'container' => '',
'menu_class' => $class,
@srikat
srikat / style.css
Last active August 29, 2015 13:56
Home Top Left and Right widget areas in Outreach Pro. http://sridharkatakam.com/home-top-left-right-widget-areas-outreach-pro/
genesis_register_sidebar( array(
'id' => 'home-top',
'name' => __( 'Home - Top', 'outreach' ),
'description' => __( 'This is the top section of the Home page.', 'outreach' ),
) );
@srikat
srikat / front-page.php
Last active August 29, 2015 13:56
Posts in columns with oEmbed support for excerpts on homepage in Dynamik. http://sridharkatakam.com/posts-columns-oembed-support-excerpts-homepage-dynamik/
<?php
/**
* To display Posts on site's front page in a 2-column responsive grid.
* URL: http://sridharkatakam.com/posts-columns-oembed-support-excerpts-homepage-dynamik/
*/
// Force full width content
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
@srikat
srikat / gist:9044509
Last active August 29, 2015 13:56
Remove background splash in Agency Pro and Metro Pro. http://sridharkatakam.com/remove-background-splash-agency-pro-metro-pro/
$("body").backstretch([BackStretchImg.src],{duration:3000,fade:750});
@srikat
srikat / style.css
Last active August 29, 2015 13:56
Replace Tagline section with a Widget Area only on homepage in Minimum Pro. http://sridharkatakam.com/replace-tagline-section-widget-area-homepage-minimum-pro/
if ( is_home() || is_front_page() )
return;