Skip to content

Instantly share code, notes, and snippets.

@About2git
About2git / functions.php
Last active April 16, 2019 17:46 — forked from srikat/functions.php
Wrapping Primary and Secondary Navigation in custom divs in Genesis
//* Wrap .nav-primary in a custom div
add_filter( 'genesis_do_nav', 'genesis_child_nav', 10, 3 );
function genesis_child_nav($nav_output, $nav, $args) {
return '<div class="nav-primary-wrapper">' . $nav_output . '</div>';
}
//* Wrap .nav-secondary in a custom div
add_filter( 'genesis_do_subnav', 'genesis_child_subnav', 10, 3 );
@About2git
About2git / functions.php
Last active August 29, 2015 14:15 — forked from srikat/functions.php
Adding a widget section below header in eleven40 Pro
genesis_register_sidebar( array(
'id' => 'featured',
'name' => __( 'Featured', 'eleven40' ),
'description' => __( 'This is the featured section.', 'eleven40' ),
) );
/** Add the home featured section */
add_action( 'genesis_after_header', 'eleven40_featured' );
function eleven40_featured() {
@About2git
About2git / style.css
Created February 15, 2015 22:20 — forked from srikat/style.css
Adding a full width YouTube video below Header in Minimum Pro
wp_enqueue_script( 'minimum-backstretch', get_bloginfo( 'stylesheet_directory' ) . '/js/backstretch.js', array( 'jquery' ), '1.0.0' );
wp_enqueue_script( 'minimum-backstretch-set', get_bloginfo('stylesheet_directory').'/js/backstretch-set.js' , array( 'jquery', 'minimum-backstretch' ), '1.0.0' );
wp_localize_script( 'minimum-backstretch-set', 'BackStretchImg', array( 'src' => get_background_image() ) );
@About2git
About2git / functions.php
Created February 15, 2015 22:19 — forked from srikat/functions.php
Primary Nav on left, Site Title or Logo in the middle and Secondary Nav on right in Genesis
//* Remove the default header
remove_action( 'genesis_header', 'genesis_do_header' );
//* Add Primary Nav in custom header
add_action( 'genesis_header', 'genesis_do_nav' );
//* Add Site Title in custom header
add_action( 'genesis_header', 'sk_do_header' );
function sk_do_header() {
@About2git
About2git / functions.php
Last active August 29, 2015 14:15 — forked from srikat/functions.php
Moving Post Info above Post Title in Genesis
//* Position post info above post title
remove_action( 'genesis_entry_header', 'genesis_post_info', 12);
add_action( 'genesis_entry_header', 'genesis_post_info', 9 );
@About2git
About2git / responsive-menu.js
Last active August 29, 2015 14:15 — forked from srikat/responsive-menu.js
Making Header menu mobile responsive in Outreach Pro
jQuery(function( $ ){
$("header .genesis-nav-menu").addClass("responsive-menu").before('<div id="responsive-menu-icon-header"></div>');
$(".nav-primary .genesis-nav-menu").addClass("responsive-menu").before('<div id="responsive-menu-icon-nav"></div>');
$("#responsive-menu-icon-header").click(function(){
$("header .genesis-nav-menu").slideToggle();
});
$("#responsive-menu-icon-nav").click(function(){
$(".nav-primary .genesis-nav-menu").slideToggle();
@About2git
About2git / gist:8d0be79f367806f270f7
Created February 15, 2015 22:18 — forked from srikat/gist:8486571
Expanding Search Box in Genesis
//* Make Font Awesome available
add_action( 'wp_enqueue_scripts', 'enqueue_font_awesome' );
function enqueue_font_awesome() {
wp_enqueue_style( 'font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css' );
}
//* Customize search form input box text
add_filter( 'genesis_search_text', 'sp_search_text' );
@About2git
About2git / style.css
Last active August 29, 2015 14:15 — forked from srikat/style.css
Using a wide header in Magazine Pro
//* Add support for custom header
add_theme_support( 'custom-header', array(
'default-text-color' => '000000',
'header-selector' => '.site-title a',
'header-text' => false,
'height' => 90,
'width' => 380,
) );
@About2git
About2git / archive-portfolio.php
Last active August 29, 2015 14:15 — forked from srikat/archive-portfolio.php
Portfolio Post Type in Genesis
<?php
/**
* This file adds the custom portfolio post type archive template.
*
*/
//* Force full width content layout
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
//* Remove the breadcrumb navigation
@About2git
About2git / functions.php
Last active August 29, 2015 14:15 — forked from srikat/functions.php
Displaying custom widget area in Primary Sidebar in Genesis
genesis_register_sidebar( array(
'id' => 'home-sidebar',
'name' => __( 'Home Sidebar', 'your-theme-slug' ),
'description' => __( 'This is the home sidebar section.', 'your-theme-slug' ),
) );
add_action( 'genesis_after_header', 'sk_custom_sidebar_homepage' );
function sk_custom_sidebar_homepage() {