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
Posts Carousel in Genesis using bxSlider.
jQuery(function( $ ){
$('.posts-carousel .carousel-items').bxSlider({
minSlides: 3,
maxSlides: 9,
slideWidth: 140,
pager: false
});
});
@About2git
About2git / front-page.php
Last active August 29, 2015 14:15 — forked from srikat/front-page.php
How to move an image from bottom to top when scrolling down in Genesis.
//* Load scripts on non-handhelds i.e., desktops only
add_action( 'wp_enqueue_scripts', 'sk_enqueue_nonhandhelds' );
function sk_enqueue_nonhandhelds() {
if ( wp_is_mobile() ) {
return;
}
wp_enqueue_script( 'stellar', get_stylesheet_directory_uri() . '/js/jquery.stellar.min.js', array( 'jquery' ), '', true );
wp_enqueue_script( 'home-non-handhelds-js', get_stylesheet_directory_uri() . '/js/home-non-mobiles.js', array( 'stellar' ), '1.0.0', true );
@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