Skip to content

Instantly share code, notes, and snippets.

@About2git
About2git / functions.php
Last active August 29, 2015 14:15 — forked from srikat/functions.php
Background Image for Header in Genesis
<?php
//* Do NOT include the opening php tag
add_theme_support( 'custom-header', array(
'header-selector' => '.site-header',
'header-text' => true,
'height' => 242,
'width' => 1080,
) );
@About2git
About2git / functions.php
Last active August 29, 2015 14:15 — forked from srikat/functions.php
How to replace Display Author when using Byline plugin in Genesis.
<?php
//* Do NOT include the opening php tag
add_filter( 'genesis_post_info', 'sk_post_info_filter' );
/**
* If a Post has at least 1 Byline, display all Bylines linking to their archive pages
* Otherwise show the native WordPress Post's author.
*
* @author Sridhar Katakam
* @link http://sridharkatakam.com/replace-display-author-using-byline-plugin-genesis/
@About2git
About2git / functions.php
Created February 13, 2015 21:28 — forked from srikat/functions.php
CSS for Multi-Column Footer Widgets in Genesis
//* Add support for 3-column footer widgets
add_theme_support( 'genesis-footer-widgets', 3 );
@About2git
About2git / page_sitemap.php
Last active August 29, 2015 14:15 — forked from srikat/page_sitemap.php
Sitemap Template in Genesis. http://cl.ly/image/2p3g2j0B2g0N
<?php
/*
Template Name: Sitemap
*/
//* Remove standard post content output
remove_action( 'genesis_post_content', 'genesis_do_post_content' );
remove_action( 'genesis_entry_content', 'genesis_do_post_content' );
@About2git
About2git / functions.php
Last active August 29, 2015 14:15 — forked from srikat/functions.php
How to echo entry specific Scripts in footer instead of head in Genesis
<?php
//* Do NOT include the opening php tag
remove_action( 'wp_head', 'genesis_header_scripts' );
add_action( 'wp_head', 'sk_header_scripts' );
/**
* Echo header scripts in to wp_head().
*
* Allows shortcodes.
*
@About2git
About2git / functions.php
Created February 13, 2015 21:28 — forked from srikat/functions.php
How to show high resolution logo on retina displays in Genesis using Foundation Interchange.
<?php
//* Do NOT include the opening php tag
//* Enqueue Foundation Interchnage
add_action( 'wp_enqueue_scripts', 'sk_foundation_interchange' );
/**
* Load Foundation and Foundation Interchange in the Footer.
* Initialize Foundation in the Footer.
*
* @author Sridhar Katakam
@About2git
About2git / style.css
Created February 13, 2015 21:29 — forked from srikat/style.css
How to place a full width slider in Home Featured widget area in Centric Pro.
$('.home-featured .wrap') .css({'height': (($(window).height()))+'px'});
$(window).resize(function(){
$('.home-featured .wrap') .css({'height': (($(window).height()))+'px'});
});
$(".home-featured .home-widgets-1 .widget:last-child").after('<p class="arrow"><a href="#home-widgets"></a></p>');
@About2git
About2git / archive-portfolio.php
Created February 13, 2015 21:29 — forked from srikat/archive-portfolio.php
How to display excerpt when hovering on featured images in Executive Pro with a flip effect
add_action( 'genesis_entry_content', 'sk_do_post_content' );
function sk_do_post_content() {
if ( has_post_thumbnail() ) {
$image = genesis_get_image( 'size=portfolio' );
} else {
$image = '<img src="' . get_stylesheet_directory_uri() . '/images/default-image.gif" />';
}
echo '<div class="flip-container">
<div class="flipper">
@About2git
About2git / functions.php
Last active August 29, 2015 14:15 — forked from srikat/functions.php
How to add Facebook, Google+ and Twitter sharing buttons without using a plugin in Genesis
//* Add Facebook, Google+ and Twitter sharing buttons after header
add_action( 'get_header', 'facebook_share_btn_sdk' );
function facebook_share_btn_sdk() {
echo '<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&appId=357648750922513&version=v2.0";
@About2git
About2git / functions.php
Last active August 29, 2015 14:15 — forked from srikat/functions.php
How to remove Page Titles selectively in Centric Pro
add_action( 'genesis_header', 'sk_remove_page_titles' );
/**
* Remove Page Titles for specific Pages.
*
* @author Sridhar Katakam
* @link http://www.sridharkatakam.com/remove-page-titles-selectively-centric-pro/
*/
function sk_remove_page_titles() {
$pages = array( 1149, 1306, 6, 24 );