Skip to content

Instantly share code, notes, and snippets.

@About2git
About2git / bxslider-init.js
Last active August 29, 2015 14:15 — forked from srikat/bxslider-init.js
Sample Widgetized Front Page with Full Width Sections in Genesis.
jQuery(document).ready(function($) {
$('.home-testimonials .testimonials').bxSlider({
minSlides: 1,
maxSlides: 1,
slideWidth: 800,
});
});
@About2git
About2git / functions.php
Created February 13, 2015 21:20 — forked from srikat/functions.php
Replacing Genesis Featured Posts widget output with custom code
//* Function to display space separated (default) category slugs
function the_category_unlinked( $separator = ' ' ) {
$categories = get_the_category();
$thelist = '';
foreach( $categories as $category ) { // concatenate
$thelist .= $separator . $category->category_nicename;
}
@About2git
About2git / functions.php
Created February 13, 2015 21:21 — forked from srikat/functions.php
Adding the missing Entry Footer markup in Genesis
//* Remove the built-in Entry Footer markup
remove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_open', 5 );
remove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_close', 15 );
add_action( 'genesis_entry_footer', 'sk_entry_footer_markup_open', 5 );
/**
* Echo the opening structural markup for the entry footer.
*
* Context: Everywhere except on static Pages.
*
@About2git
About2git / functions.php
Last active August 29, 2015 14:15 — forked from srikat/functions.php
Adding links to previous and next entries that slide open to reveal titles in Genesis.
//* Make Font Awesome available
add_action( 'wp_enqueue_scripts', 'enqueue_font_awesome' );
function enqueue_font_awesome() {
wp_enqueue_style( 'font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css' );
}
add_action( 'wp_enqueue_scripts', 'sk_sitewide_non_handhelds_scripts' );
/**
@About2git
About2git / single.php
Created February 13, 2015 21:21 — forked from srikat/single.php
How to add a 'New' ribbon for Posts published in the last 7 days in Genesis
@media only screen and (max-width: 800px) {
body {
background: #f5f5f5;;
}
.entry {
padding: 50px 60px;
}
.comment-respond,
@About2git
About2git / functions.php
Last active August 29, 2015 14:15 — forked from srikat/functions.php
Populate text area on single Posts with Post content in Genesis
add_action( 'wp_enqueue_scripts', 'sk_enqueue_script_on_posts' );
function sk_enqueue_script_on_posts() {
/**
* Load a js file on Post pages and localize it with Post's data
*
* Context: Single Post pages
*
* @author Sridhar Katakam
* @link http://sridharkatakam.com/
*/
@About2git
About2git / functions.php
Created February 13, 2015 21:22 — forked from srikat/functions.php
How to display a Fixed Mini Header when Scrolling down in Genesis
add_action( 'genesis_after_header', 'sk_mini_fixed_header' );
/**
* Mini header with a logo image at left and menu at right.
*
* @author Sridhar Katakam
* @link http://sridharkatakam.com/
*/
function sk_mini_fixed_header() { ?>
<div class="mini-header">
<div class="wrap">
@About2git
About2git / functions.php
Last active August 29, 2015 14:15 — forked from srikat/functions.php
How to display Featured images above Posts with Title as overlay
//* Register a custom image size for Featured images above entries on list pages
add_image_size( 'archive-featured-image', 800, 300, true );
add_action( 'genesis_before_entry', 'sk_featured_image_above_posts' );
/**
* Display Featured Image above Post Titles regardless of Content Archives settings
*
* Context: Posts page, all archives and search results pages.
*
* @author Sridhar Katakam
@About2git
About2git / functions.php
Last active August 29, 2015 14:15 — forked from srikat/functions.php
Collapsible Horizontal Opt-in form in Genesis
//* Register Home Optin widget area
genesis_register_sidebar( array(
'id' => 'home-optin',
'name' => __( 'Home Optin', 'lifestyle' ),
'description' => __( 'This is the home opt-in form section.', 'lifestyle' ),
) );
add_action( 'genesis_after_header', 'sk_optin_below_header' );
/**
* Display Home Optin widget area
@About2git
About2git / functions.php
Last active August 29, 2015 14:15 — forked from srikat/functions.php
Wide Featured images for the latest 3 Posts and thumbnails for the rest in Genesis
//* Add new image size
add_image_size( 'home-featured-image', 680, 0, true );
add_action( 'pre_get_posts', 'sk_set_posts_per_page_home' );
/**
* Change Posts Per Page for Event Archive
*
* @author Bill Erickson
* @link http://www.billerickson.net/customize-the-wordpress-query/
* @param object $query data