Skip to content

Instantly share code, notes, and snippets.

Avatar

Brad Dalton braddalton

View GitHub Profile
View functions.php
add_filter( 'genesis_breadcrumb_args', 'child_breadcrumb_args' );
function child_breadcrumb_args( $args ) {
if ( is_single() ) {
$args['labels']['prefix'] = '';
$args['home'] = ' Home ';
$args['sep'] = ' >> ';
$args['labels']['author'] = ' Posts ';
View functions.php
//* Genesis grid loop
add_action( 'genesis_after_loop', 'minimum_grid_loop_helper' );
function minimum_grid_loop_helper() {
if ( is_front_page() && function_exists( 'genesis_grid_loop' ) ) {
genesis_grid_loop( array(
'features' => 10,
'feature_image_size' => 0,
'feature_content_limit' => 0,
'grid_image_size' => 0,
@braddalton
braddalton / functions.php
Created Feb 14, 2014
Use Woo Commerce With Genesis and StudioPress Child Themes.
View functions.php
add_theme_support( 'genesis-connect-woocommerce' );
@braddalton
braddalton / functions.php
Last active Aug 29, 2015
Add Woo Commerce Support To The Twenty Fourteen Default Theme for WordPress
View functions.php
/**
* Easier Option http://wpsites.net/best-plugins/benefits-of-integrating-customizing-woocommerce-with-genesis-themes/
*/
// Remove stock wrappers
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10 );
remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10 );
// Add 2014 compatible wrappers
add_action( 'woocommerce_before_main_content', 'wc_twentyfourteen_wrapper', 10 );
add_action( 'woocommerce_after_main_content', 'wc_twentyfourteen_wrapper_close', 10 );
@braddalton
braddalton / functions.php
Created Feb 26, 2014
Remove Post Meta Links for Categories & Tags from Entry Footer of Genesis HTML 5 Child Themes
View functions.php
remove_action( 'genesis_entry_footer', 'genesis_post_meta' );
@braddalton
braddalton / functions.php
Last active Aug 29, 2015
Remove Post Info Links for Author, Date & Comments from Entry Header of Genesis HTML 5 Child Themes
View functions.php
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
View functions.php
add_shortcode( 'post_date', 'genesis_post_date_shortcode' );
/**
* Produces the date of post publication.
*/
function genesis_post_date_shortcode( $atts ) {
$defaults = array(
'after' => '',
'before' => '',
View gist:9407377
<?php
/**
* Create Archive Layout
* @author Bill Erickson
* @link http://www.billerickson.net/wordpress-genesis-custom-layout/
*/
function be_create_archive_layout() {
genesis_register_layout( 'sidebar-content-archive', array(
'label' => __('Sidebar/Content Archive', 'genesis'),
'img' => get_bloginfo('stylesheet_directory') . '/images/layout-sidebar-content-archive.gif'
View gist:9407379
<?php
/**
* Custom Loop for Archive Layout
* @author Bill Erickson
* @link http://www.billerickson.net/wordpress-genesis-custom-layout/
*/
function be_archive_layout_loop() {
$site_layout = genesis_site_layout();
if ( 'sidebar-content-archive' == $site_layout ) {
be_archive_loop();
@braddalton
braddalton / style.css
Created May 3, 2014
Style Unordered List Using Image
View style.css
ul {
list-style-image: url(images/arrow.png);
}