Skip to content

Instantly share code, notes, and snippets.

View braddalton's full-sized avatar

Brad Dalton braddalton

View GitHub Profile
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 ';
//* 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 February 14, 2014 17:51
Use Woo Commerce With Genesis and StudioPress Child Themes.
add_theme_support( 'genesis-connect-woocommerce' );
@braddalton
braddalton / functions.php
Last active August 29, 2015 13:56
Add Woo Commerce Support To The Twenty Fourteen Default Theme for WordPress
/**
* 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 February 26, 2014 04:30
Remove Post Meta Links for Categories & Tags from Entry Footer of Genesis HTML 5 Child Themes
remove_action( 'genesis_entry_footer', 'genesis_post_meta' );
@braddalton
braddalton / functions.php
Last active August 29, 2015 13:56
Remove Post Info Links for Author, Date & Comments from Entry Header of Genesis HTML 5 Child Themes
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
add_shortcode( 'post_date', 'genesis_post_date_shortcode' );
/**
* Produces the date of post publication.
*/
function genesis_post_date_shortcode( $atts ) {
$defaults = array(
'after' => '',
'before' => '',
<?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'
<?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 04:26
Style Unordered List Using Image
ul {
list-style-image: url(images/arrow.png);
}